Jump to content
Changes to the Jaspersoft community edition download ×

Java_Jasper

Members
  • Posts

    71
  • Joined

  • Last visited

Java_Jasper's Achievements

  1. My inital guess would be the path you are using is incorrect, frist check this. As when the XML is executed it cannot find on the classpath said locaiton. Thus the URL path to your XML file must be wrong/ missing. You should post your path you are using. The correct format would look like this: file:///C:/Documents+and+Settings/iReport/ Take note of the '3' slashes and '+' signs for spaces as URLs dont like spaces.
  2. Hmm, so what you are saying is you have 2 reports each with a separate data source. And when you execute both in same window only one data source is available, however separate they behave as expected. It sounds like you are taking about virtual data sources, which is in the commercial 5.0 version only. It allows multiple JDBC and/or JNDI data sources and use the combination as a single data source. Hope this helps.
  3. This may be a bit of a hack but I would recommend you use several group headers, a sub-report (for City) and an ID for each (Province). This will allow for evaluation once per cycle. Example: 1) Make each province ID from the database usable in the sql query Province - Ontario ID = 1 Province - Nova Scotia ID = 2 Province - Quebec ID = 3 In order to make the IDs trigger for each iteration you can use group headers, as they are evaluated once per cycle - per say. 2) Now, insert some group headers more then one. 3) Then place a sub report (for you it would be the City) into the footer and pass into the 'Field' which is $F{ID} This results in a sub report that triggers every time the header is evaluated, and the header will only print at the end of each sub-report. Enjoy!
  4. I belive there are two ways to acomplish this witht he latter being best practices. 1) You could hard code it like so: String date = 14121114235959 $P{FormattedDate} = new SimpleDateFormat("EEEE MMM dd, yyyy") $P{FormattedDate}.format($P{date}) ; 2) Or you could use the JVM But the better choice would be to use the JVM like so: DateFormat.getDateInstance(DateFormat.MEDIUM, $P{REPORT_LOCALE}).format( $F{FormattedDate} ) DateFormat.getDateInstance(DateFormat.LONG, $P{REPORT_LOCALE}).format( $F{FormattedDate} ) This way it automatically reflects formatting choices already chosen by the user on his own PC. Enjoy!
  5. You will want to use a servlet, for this. public void doGet( HttpServletRequest request, HttpServletResponse response) throws ServeltException, IOException { String directory = " "; directory = request.getPram("dir"); --your defined direcotry on your system. paramater = new HashMap(subReport(direcory)); -- this will define your sub report as a paramater in a hash map } Where subReport is the method: public Map subReport(String direcotry) throws JRExcption, FileNotFoundExcption { String japerFile = directory + " Name_of_your_file "; JaperDesign subReportDef = JRXmlLoader.load(new FileInputStream(new File( jasperFile))); JasperReport subReport = JasperCompilerManager.compileReport( subReportDef ); Map result = new HashMap(); result.put( "paramater_name_in_jasper_template, subReport); return result; } Enjoy!
  6. I am glad you found the problem, based on my reply.
  7. Yes it is possible, but not recommended; everything but the main report connection must be defined within a parameter, and unless JNDI name spaces are configured for the various data sources, usernames and passwords must be stored within the JRXML itself; which for various reasons is not good design practice. Jasper is intended to use one datasource per report This info was obtained via "gertbeedfrobe" Enjoy!
  8. Hello, You will need to do something like this example: SimpleDateFormat("dd/MM/yy").parse("01/01/01") Where the fields evaluation time needs to be set to "Report" & Calculation Type to "First" & reset type = "None". Below is an example of use: (New SimpleDateFormat("dd/mm/yy").format($F{birthDate}) Enjoy!
  9. A thread I posted a while ago concerning such a task. http://community.jaspersoft.com/questions/542773/blob-jrdesignimage Here is a video on how to do such a task. http://ireport-tutorial.blogspot.com/2008/11/show-blob-image-in-ireport.html Enjoy!
  10. Not sure if this is possible, but here is some documentation on it. http://community.jaspersoft.com/documentation/jasperreports-server-user-guide/ad-hoc-view-panel Enjoy!
  11. Hello, Here is a link to get you started, a quick tutorial. http://www.tutorialspoint.com/jasper_reports/jasper_crosstabs.htm B.
  12. Hello, This link may help. http://community.jaspersoft.com/wiki/using-custom-bean-definitions-file-50 Enjoy!
  13. Hello, Is the font you spoke of in the Windows font folder as well? B.
  14. Hello, Sure this can be done, follow the steps in this link. http://community.jaspersoft.com/wiki/how-set-role-based-jasperreports-server-home-pages Enjoy!
×
×
  • Create New...