Jump to content
Changes to the Jaspersoft community edition download ×

donclary

Members
  • Posts

    17
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by donclary

  1. I have been running the XMLDataSource sample program and my application in the JDev debugger. It seems that jasper reports does not find the data source when my app is running. I have attached the log4j output (debug level) from jasper reports, my data file and my .jrxml files. Belos is the code snippet where I set up the call to fill the master report: Anyone have any clues as to why the datasource is not found? Thank you! Don Code: Post Edited by donclary at 12/14/2009 06:54
  2. I have modified the XMLDataSource example to use my master report & subreports from a jar. I incorporated the advice from Teodord and use JRLoader.loadObjectFromLocation(String) to load my master report. I also incorporated pinoy_ako's advice and modified the master report to use net.sf.jasperreports.engine.util.JRLoader.loadObject(getClass().getResource to call the subreports. The modified XMLDataSource example, running under ant, produces the correct output. However, using the same report.jar and above method call to load the master report in my jared application, running from the java command line, produces a resource not found exception. I have the jar containing the .jasper files in the classpath in my application's MANIFEST. The error is "java.io.IOException: Could not find resource ./HSA_Hours_Remaining.jasper". The master report and subreports are not in any subdirectories in the report .jar. I suspect that this is a classpath problem, but I have not been able to figure this out. Can anyone provide clues or suggestions? Thank you! Don
  3. Good Morning Benoit! I may have the same problem. My master report and four subreports (XML datasource) work fine in iReport. The master report (compiled reports in a jar) creates the correct number of records from within my java app, but the subreports only print their headers. I add text fields to print the subreport parameters and found that they are all being received as null. Sorry that I can't tell you how to fix it, but it may explain what is happening. Regards!
  4. Hi Kalim! Thanks very much for the hint. I implemented some "print when" fields in my subreports to print the passed in parameters. The entire report works correctly when the reports are loose in the same directory as my test app. The values are null, when I jar up the jasper files and run my full program (which only uses the jasper files), so something odd is happening. It will take more experimentation to figure out what is going on. Thank you! Don
  5. I have a master report and four subreports that function correctly in iReport (3.0.0). The JasperReports version is also 3.0.0. Calling the master report from within a java program generates the correct number of pages and no errors. However, the subreports contain none of the data from XML datasource that is present when running the same report templates. I have stepped through most of the "fill" methods, but did not identify where the data was actually getting pulled from the datasource. Does anyone have any hints (1) as to why data is not getting to the report from when run from the java app, or (2) where to look in the JasperReports source for extracting the data from the datasource? Thank you! Don
  6. I found the "Main Console" and "Output Window" under View | Docking panes. I was able to work through most of the issues using the information presented in the Output Window. I did not find a physical log file.
  7. I have a master report and four subreports that I am converting from SQL to XML queries. Filling the report fails in iReport. Does iReport create a log file that may contain clues to help be debug the failure? Thank you!
  8. There is another thread that also has a requirement to show/hide columns based on user input. Can you accomplish what you want by dynamicallly building a parameter list of subreports that is passed to the Master? Each column in your report would need to be a separate subreport. How many columns do you want to display in your report?
  9. Did you think about making each column that you want to display/hide a separate subreport? You could build the parameter list of subreports based on the columns that the user selects. The Subreport example shows how to pass subreports as parameters. Good luck!
  10. I have a master report and three subreports that were created using iReport. The master and subreports all work correctly when run from iReport. The master report passes a LABELID parameter to the LabelSubreport to print a mailing label. The master report and label subreport jrxml files are attached. I am now calling the master report from a java app and the error below is generated by the first subreport. Table LABELLIST is the list of mailing labels and does exist. The LabelSubreport uses the same datasource as the Master. I could not get the SubreportApp.java example to work, but seems to imply that the subreports need to be set up as parameters? Any advice on the cause of my problem would be appreciated. Thank you! ============================================================ Filling report... Sep 13, 2008 4:07:37 PM net.sf.jasperreports.engine.fill.JRFillSubreport prepare SEVERE: Fill 15312834: exception net.sf.jasperreports.engine.JRException: Error preparing statement for executing the report query : SELECT * FROM "LABELLIST" LABELLIST WHERE LABELID = ? at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.java:192) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:123) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:656) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:588) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1196) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:833) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:782) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:532) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:209) at java.lang.Thread.run(Thread.java:595) Caused by: java.sql.SQLException: Table/View 'LABELLIST' does not exist. at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:248) at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.prepareStatement(PoolingDriver.java:367) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.java:162) ... 10 more Caused by: org.apache.derby.client.am.SqlException: Table/View 'LABELLIST' does not exist. at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) ... 14 more Exception in thread "Thread-3" net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error preparing statement for executing the report query :
  11. I have attached the sample that I created when exploring the problem you reported. Maybe you can canabalize something from it. Set the default value for the parameter ID and the report will stop working. Good Luck! [file name=Labels.jrxml size=7753]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Labels.jrxml[/file]
  12. I found the referenced post to be a very helpful. I am using described in the post, but "Use a static absolute path" for the subreport reference. So far my master/subreport do not work together. I am interested to hear if the example described in Pedja's post works with using a static absolute path.
  13. I deleted the subreport again. This time the master continues to function. With the parameter "Use as a prompt" is set to "yes" and when set to "no". I added the subreport back in (using the Wizard) and the master no longer works.
  14. The master report does work, but the parameter is not used in the query. The paramter is mapped to one of the fields in the query. The master works when the parameter "Use as prompt" is configured to "yes" and when configured to "no". There is no default value configured for the parameter.
  15. Try "Options", "Disable Elements Mouse Move". You can not move elements with the mouse, if this is checked. I have iReport 2.0.2 and this is toggled with Ctrl+M.
  16. Do you really want a default value for the parameter? I played around with a similar example. I have "Use as prompt" set to yes. My example prompts for a value and creates a report, until I set a default value. I tried leaving the default value and setting prompt to no, but it still does not work. Good Luck. I Hope to see how you solve this problem.
  17. I have created a Master report that works when there is no subreport included. I have also created a subreport that works correctly when I execute it. The master report is attached. The master report stops working after I insert the subreport. I have read many posts in this forum on subreports and found good advice. I have created the parameter in the master and subreport. When no data property for the subreport is set to "All sections, no detail", as suggested in the forum. I do not understand why the master stops working when the subreport is included. Suggestions for correcting this problem would be appreciated. Thank you! [file name=HSA_Hours_Report.jrxml size=9288]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/HSA_Hours_Report.jrxml[/file]
×
×
  • Create New...