Jump to content
Changes to the Jaspersoft community edition download ×

kjhuebner

Members
  • Posts

    33
  • 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 kjhuebner

  1. Hi folks, I have a report where the first report page renders wider than all subsequent pages in a multipage report. This is occuring in a Swing JEditPane. In IE, the width appears consistent. The HTML output shows that the 1st page colspan=29 and the second page to nth page has colspan=21. Why would this occur? Is there anything I can do to have a consistent colspan used for all pages? I suspect this issue is related to the title that exists on the 1st page. I include templates, snapshot, and HTML output of page 1 and page 2. Thanks, Ken Huebner Catalyst International, Inc. [file name=IntransitInventory_1stPageWide.zip size=55453]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/IntransitInventory_1stPageWide.zip[/file]
  2. Hi Teodor, Here's the jrxml files that were used to generate the xml and html. I also included the full xml and html output for viewing. The output is generated from a master report containing two subreports using custom data sources. (The HTML is rendered in a Swing application, so note that if you have IE render the included html, you'll see some vertical spaces between data.) But again, the HTML ordering is correct. The XML ordering is not. Thanks, Ken [file name=2006_10_2_xmlOrderingBad_withHTML.zip size=29786]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/2006_10_2_xmlOrderingBad_withHTML.zip[/file]
  3. When I export a JasperPrint object as XML the order of data is mixed up. That is, the table "Heading" data appears AFTER the "content" data. And the Title appears AFTER a heading. Yet these things are in the proper order when the very same JasperPrint object is exported as HTML. As a result the XML data is unusable since I was planning to parse this data--separating it into column heading data followed by content. Is there any solution to this significant issue? Thanks! Ken XML Data... Code: <text textHeight="13.798828" lineSpacingFactor="1.1499023" leadingOffset="-2.3466797"> <reportElement mode="Opaque" x="29" y="203" width="135" height="20"/> <box topBorder="None" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="5" bottomBorder="None" bottomBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000"/> <textContent><![CDATA[1010322000]]></textContent> </text> <text textHeight="13.798828" lineSpacingFactor="1.1499023" leadingOffset="-2.3466797"> <reportElement mode="Opaque" x="164" y="203" width="186" height="20"/> <box topBorder="None" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="10" bottomBorder="None" bottomBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000"/> <textContent><![CDATA[0]]></textContent> </text> <text textHeight="13.798828" lineSpacingFactor="1.1499023" leadingOffset="-2.3466797"> <reportElement x="350" y="203" width="201" height="20"/> <box topBorder="None" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="10" bottomBorder="None" bottomBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000"/> <textContent><![CDATA[13]]></textContent> </text> <text textAlignment="Left" verticalAlignment="Top" textHeight="15.09375" rotation="None" lineSpacing="Single" lineSpacingFactor="1.2578125" leadingOffset="-2.6367188"> <reportElement mode="Opaque" x="29" y="186" width="135" height="17" forecolor="#FFFFFF" backcolor="#3366FF"/> <box topBorder="None" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="5" bottomBorder="None" bottomBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000"/> <font fontName="Helvetica" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="CP1252" isPdfEmbedded="false"/> <textContent><![CDATA[item Id]]></textContent> </text> <text textAlignment="Left" verticalAlignment="Top" textHeight="15.09375" rotation="None" lineSpacing="Single" lineSpacingFactor="1.2578125" leadingOffset="-2.6367188"> <reportElement mode="Opaque" x="164" y="186" width="186" height="17" forecolor="#FFFFFF" backcolor="#3366FF"/> <box topBorder="None" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="5" bottomBorder="None" bottomBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000"/> <font fontName="Helvetica" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="CP1252" isPdfEmbedded="false"/> <textContent><![CDATA[inbound Qty]]></textContent> </text> <text textAlignment="Left" verticalAlignment="Top" textHeight="15.09375" rotation="None" lineSpacing="Single" lineSpacingFactor="1.2578125" leadingOffset="-2.6367188"> <reportElement mode="Opaque" x="350" y="186" width="201" height="17" forecolor="#FFFFFF" backcolor="#3366FF"/> <box topBorder="None" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="5" bottomBorder="None" bottomBorderColor="#000000" rightBorder="Thin" rightBorderColor="#000000"/> <font fontName="Helvetica" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica-Bold" pdfEncoding="CP1252" isPdfEmbedded="false"/> <textContent><![CDATA[OutboundQty]]></textContent> </text> HTML Data... Code:[code]<tr valign="top"> <td><img alt="" src="px" style="width: 29px; height: 17px"/></td> <td colspan="7" style="background-color: #3366FF; border-left-style: solid; border-left-width: 1px; border-left-color: #000000; padding-left: 5px; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; "><span style="font-family: Helvetica; color: #FFFFFF; background-color: #3366FF; font-size: 12.0px; font-weight: bold;">Item Id</span></td> <td colspan="8" style="background-color: #3366FF; border-left-style: solid; border-left-width: 1px; border-left-color: #000000; padding-left: 5px; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; "><span style="font-family: Helvetica; color: #FFFFFF; background-color: #3366FF; font-size: 12.0px; font-weight: bold;">Inbound Qty</span></td> <td colspan="12" style="background-color: #3366FF; border-left-style: solid; border-left-width: 1px; border-left-color: #000000; padding-left: 5px; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; "><span style="font-family: Helvetica; color: #FFFFFF; background-color: #3366FF; font-size: 12.0px; font-weight: bold;">OutboundQty</span></td> <td><img alt="" src="px" style="width: 44px; height: 17px"/></td> </tr> <tr valign="top"> <td><img alt="" src="px" style="width: 29px; height: 20px"/></td> <td colspan="7" style="border-left-style: solid; border-left-width: 1px; border-left-color: #000000; padding-left: 5px; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; "><span style="font-family: Arial; background-color: #FFFFFF; font-size: 12.0px;">1010322000</span></td> <td colspan="8" style="border-left-style: solid; border-left-width: 1px; border-left-color: #000000; padding-left: 10px; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; "><span style="font-family: Arial; background-color: #FFFFFF; font-size: 12.0px;">0</span></td> <td colspan="12" style="border-left-style: solid; border-left-width: 1px; border-left-color: #000000; padding-left: 10px; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; "><span style="font-family: Arial; font-size: 12.0px;">13</span></td> <td><img alt="" src="px" style="width: 44px; height: 20px"/></td> </tr>
  4. Hi folks, I've been exporting my reports to HTML and rendering in Swing. However the rendering results are buggy--which I have not solved yet. So I thought I would get consistent results if I would export Jasper data as XML and populate a Swing TreeTable component with data. This way the data can be interactive since one can open and close a displayed tree. Nice idea, huh? :silly: But when I export data as XML the order of data in the XML is mixed up!! That is, the table "Heading" data appears AFTER the "content" data. And the Title appears AFTER a heading. Yet these things are at least in the proper order when the very same JasperPrint object is exported as HTML. The result being the XML data is unusable from a programmatic perspective. :sick: I hope someone can help me soothe my soul. Ken
  5. Snapshot size=240]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/2006_9_6_IntransitInventory_small.jpg Post edited by: kjhuebner, at: 2006/09/07 20:28
  6. Hi, On a master report-subreport view, the Jasper engine was putting too much vertical space between the content. So I went into both of my subreports, and set the height of all unused bands to zero. However, when I ran the report again, the content of one of the subreports disappeared. I have yet to know why? Using IReport, I experimented with 1) adjusting heights of the subreport areas designated in the master report; 2) adjusting heights of the unused bands back to 20-50; 3) adjusting margin,column widths -- but nothing solves my problem. I attached the templates with significant vertical space between rows, but show content correctly. And I attached the templates after setting unused bands to zero height, but show missing content on the Inbound (Purchase) Order subreport. Snapshot is what the report should look like when everything is working correctly. [file name=2006_9_6_TemplatesAndSnapshot.zip size=51680]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/2006_9_6_TemplatesAndSnapshot.zip[/file] Post edited by: kjhuebner, at: 2006/09/07 20:20 Post edited by: kjhuebner, at: 2006/09/07 20:23
  7. Hi Please answer a couple questions: 1. Is a ResourceBundle required during the JasperFillManager.fillReport() operation? 2. Are thread-safe objects (ie Vector and Hashtable) required when talking to the Jasper engine? A day ago, when I ran a report that use to work, now is missing data. So I assumed a threading issue. Whereby, I switched from passing a HashMap to a Hashtable to the JasperFillManager.fillReport() method. However I now see a Jasper engine exception because its attempting to put a null value into the Hashtable. Code: java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:393) at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:574) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:879) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:708) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at com.catalystwms.cct.web.servlets.JasperDelegate.fillReport(JasperDelegate.java:597) at com.catalystwms.cct.web.servlets.CCTViewServlet.addObjectResponse_getReportAsHTML(CCTViewServlet.java:1405) Thanks! Ken
  8. Hi, Is the feature to set pagewidth,pageheight, margins,etc. at runtime available in latest release1.2.5? By runtime, I mean using a pre-compiled jasperreport along with perhaps some properties passed to engine. Teodor mentioned on Jan.2003 in a sourceforge forum discussion that such a feature was planned. I sure need this important feature implemented -- if its not available. :woohoo: Thanks, Ken
  9. Ok, I'm going to have to eat crow on this one. My mistake. Mea Culpa. I now see a report title AND content using my custom datasource. I had a bug in my custom datasource's base class, in the next() method being called by Jasper. It was improperly returning false, instead of true. Duh. I also discovered the switch which turns on title/graphics when no content exists: Code: whenNoDataType="AllSectionsNoDetail" Now on to getting my subreport to work... Regards, Ken
  10. Here's my jrxml files. Ken [file name=CCTIntransitInventory.zip size=3381]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/CCTIntransitInventory.zip[/file]
  11. Hi, What causes the Jasper engine to return empty HTML (having no content or report title) and yet it throws no exceptions? I'm using a custom datasource that I know contains data. I call the method fill(jasperReport, map, dataSource) followed by a call to export HTML. And it returns this: Code:<html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <style type="text/css"> a {text-decoration: none} </style> </head> <body text="#000000" link="#000000" alink="#000000" vlink="#000000"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr><td width="50%"> </td><td align="center"> </td><td width="50%"> </td></tr> </table> </body> </html> So I tried some experiments to find out what might be the cause. 1. I tried the fill(jasperReport, map, dbConnection) with a test report. It successfully created html WITH content. 2. I tried the fill(jasperReport, map, dbConnection) with report missing the queryString element. It created html WITHOUT content and NO exceptions. Much like what I was seeing with my report using a custom datasource. So now I ask... Why do the Jasper products give so little information to the developer when they are run??[/ul] As a 15-year software developer, this is very frustrating and it makes the Jasper products appear primitive. My guess, the cause of my issue is that the Jasper report running my custom datasource cannot find data. But if it cannot find data, is it because of a classpath problem to my custom datasource, an empty datasource, what?? Also, if a report has no content, why does Jasper generate a blank report? Shouldn't it at least have a title? Again, I see no exceptions -- just empty HTML from Jasper. Any comments are much appreciated. Ken Java Architect Catalyst International, Inc.
  12. Hey, I have confidence in all of you -- Giulio, Lucian, and the JasperTeam! If I wasn't so busy with my own technical work, I'd be happy to lend a hand. Ken :cheer:
  13. Thanks Lucian for your reply. If I'm hearing you right, IReport forbids me from using a custom datasource during the fill operation. Sounds like a major bug. Also, please ignore the subreport's datasource entry you noticed (you're very observant :woohoo: ). My intention was to retrieve the subreport datasource by: <dataSourceExpression><![CDATA[((com.catalystwms.report.TestDataSource)$P{REPORT_DATA_SOURCE}).getSubDataSource("Tasks")]]></dataSourceExpression> The above code started this whole exploration. This failed due to the Class Cast exception problem. We now know this a class loader bug in IReport. I hope you guys fix this soon. Without this bug fix in IReport, its going to be difficult or impossible to incorporate Jasper into our company product. Ken
  14. [file name=TestDataSource-3454e0948eb140276eb408b731c67e93.zip size=23342]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TestDataSource-3454e0948eb140276eb408b731c67e93.zip[/file]
  15. It's hard to be optimistic after 3 days of fiddling with Jasper and IReport. Nonetheless I will describe my latest issue: I get a Class Cast exception when retrieving a custom data source at the subreport level. And knowing there is no effective means to understand what's going on under the covers (since this tool is very deficient in providing such means to developers) I decided to do an experiment. I wanted to determine what was in the REPORT_DATA_SOURCE parameter at the top of the master report. So I setup a parameter to retrieve a value that I assumed to be my custom data source. (For my connection setup had already tested OK with my custom datasource "com.catalystwms.cct.web.beans.reports.TestDataSource" within IReport) But when I run this snippet of code in my report, out pops the Class cast exception. Why? Why doesn't this work? (All files are attached.) Code:<parameter name="JR_REPORT_DATA_SOURCE" isForPrompting="false" class="com.catalystwms.cct.web.beans.reports.TestDataSource"> <defaultValueExpression ><![CDATA[((com.catalystwms.cct.web.beans.reports.TestDataSource)$P{REPORT_DATA_SOURCE})]]></ defaultValueExpression> </parameter> IReport TRACE ============== Time zone: default Error filling print... ENTERED TestDataSourceFactory.getTheDatasource() ENTERED TestDataSource() CONSTRUCTOR ENTERED addRow index=0 ENTERED TestDataSource(List) CONSTRUCTOR ENTERED TestDataSource.putSubDataSourceFromRow() key=Tasks ENTERED addRow index=1 ENTERED TestDataSource(List) CONSTRUCTOR ENTERED TestDataSource.putSubDataSourceFromRow() key=Tasks java.lang.ClassCastException: com.catalystwms.cct.web.beans.reports.TestDataSource at TestDataSource_1154553627259_783159.evaluate(TestDataSource_1154553627259_783159:126) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:539) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:507) at net.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java :631) at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java: 593) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:879) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:708) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:728) at java.lang.Thread.run(Unknown Source) NESTED BY : java.lang.ClassCastException: com.catalystwms.cct.web.beans.reports.TestDataSource at TestDataSource_1154553627259_783159.evaluate(TestDataSource_1154553627259_783159:126) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:539) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:507) at net.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java :631) at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java: 593) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:879) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:708) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:728) at java.lang.Thread.run(Unknown Source) NESTED BY : net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : ((com.catalystwms.cct.web.beans.reports.TestDataSource) $P{REPORT_DATA_SOURCE}) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:183) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:539) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:507) at net.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java :631) at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java: 593) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:879) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:708) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:728) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassCastException: com.catalystwms.cct.web.beans.reports.TestDataSource at TestDataSource_1154553627259_783159.evaluate(TestDataSource_1154553627259_783159:126) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) ... 11 more Print not filled. Try to use an EmptyDataSource...! Code:[code] [file name=TestDataSource-ee74ec388dcb63ad3fc8aec51997a982.zip size=23342]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TestDataSource-ee74ec388dcb63ad3fc8aec51997a982.zip[/file] :«»sick:
  16. Files: [file name=TestDataSource-a8b3d704fe7c9f10704a34bc6adbaf36.zip size=23342]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TestDataSource-a8b3d704fe7c9f10704a34bc6adbaf36.zip[/file]
  17. It's hard to be optimistic after 3 days of fiddling with Jasper and IReport. Nonetheless I will describe my latest issue: I get a Class Cast exception when retrieving a custom data source at the subreport level. And knowing there is no effective means to understand what's going on under the covers (since this tool is very deficient in providing such means to developers) I decided to do an experiment. I wanted to determine what was in the REPORT_DATA_SOURCE property at the top of the master report. So I setup a property to retrieve a value that I assumed to be my custom data source. (For my connection setup had already tested OK with my custom datasource "com.catalystwms.cct.web.beans.reports.TestDataSource") But when I run this snippet of code in my report, out pops the Class cast exception. Why? Why doesn't this work? (All files are attached.) ((com.catalystwms.cct.web.beans.reports.TestDataSource)$P{REPORT_DATA_SOURCE}) IReport TRACE ============== ÂTime zone: default ErrorÂfillingÂprint... ENTEREDÂTestDataSourceFactory.getTheDatasource() ENTEREDÂTestDataSource()ÂCONSTRUCTOR ENTEREDÂaddRowÂindex=0 ENTEREDÂTestDataSource(List)ÂCONSTRUCTOR ENTEREDÂTestDataSource.putSubDataSourceFromRow()Âkey=Tasks ENTEREDÂaddRowÂindex=1 ENTEREDÂTestDataSource(List)ÂCONSTRUCTOR ENTEREDÂTestDataSource.putSubDataSourceFromRow()Âkey=Tasks java.lang.ClassCastException:Âcom.catalystwms.cct.web.beans.reports.TestDataSource ÂÂÂÂatÂTestDataSource_1154553627259_783159.evaluate(TestDataSource_1154553627259_783159:126) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:539) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:507) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java:631) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:593) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:879) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:708) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) ÂÂÂÂatÂit.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:728) ÂÂÂÂatÂjava.lang.Thread.run(UnknownÂSource) NESTEDÂBYÂ: java.lang.ClassCastException:Âcom.catalystwms.cct.web.beans.reports.TestDataSource ÂÂÂÂatÂTestDataSource_1154553627259_783159.evaluate(TestDataSource_1154553627259_783159:126) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:539) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:507) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java:631) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:593) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:879) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:708) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) ÂÂÂÂatÂit.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:728) ÂÂÂÂatÂjava.lang.Thread.run(UnknownÂSource) NESTEDÂBYÂ: net.sf.jasperreports.engine.fill.JRExpressionEvalException:ÂErrorÂevaluatingÂexpressionÂ:Â ÂÂÂÂSourceÂtextÂ:Â((com.catalystwms.cct.web.beans.reports.TestDataSource)$P{REPORT_DATA_SOURCE}) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:183) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:539) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:507) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java:631) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:593) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:879) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:708) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:685) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) ÂÂÂÂatÂit.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:728) ÂÂÂÂatÂjava.lang.Thread.run(UnknownÂSource) CausedÂby:Âjava.lang.ClassCastException:Âcom.catalystwms.cct.web.beans.reports.TestDataSource ÂÂÂÂatÂTestDataSource_1154553627259_783159.evaluate(TestDataSource_1154553627259_783159:126) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) ÂÂÂÂ...Â11Âmore PrintÂnotÂfilled.ÂTryÂtoÂuseÂanÂEmptyDataSource...!
  18. It's still failing on getting subreport's datasource (class cast exception). Regarding your classpath theory, I'm already using a static classpath defined within IReport under Options | Classpath. Also, IReport finds my classes during Connection setup as it gives me an OK message. 1. Are there any other classpaths I have to define in IReport? 2. Can I assume that my custom TestDataSource IS the value contained in REPORT_DATA_SOURCE when I run the report? My reasoning is that since I have setup up a factory to return my TestDataSource using IReport's Connection setup dialog and tested OK. Whereby, when I run report within IReport shouldn't this work? <subreport isUsingCache="false"> ... <dataSourceExpression><![CDATA[((com.catalystwms.cct.web.beans.reports.TestDataSource)$P{REPORT_DATA_SOURCE}).getSubDataSourceFromRow("Tasks")]]></dataSourceExpression> ... </subreport> 3. Or will this not work within the IReport tool and I have to run this outside the tool? But then what good is the tool if I cannot observe the simplest of test data being processed by Jasper? Ken
  19. Hi, I've been trying to get a master and subreport to work using a custom datasource having a hierarchical structure. (See attached .zip file for full details) The datasource is composed of a list of rows (list of Maps with fieldname,value pairs) and associated with each row is a "sub" datasource (containing list of Maps with fieldname,value pairs). However, when I run report, it fails at filling the subreport due to failing at retrieving the "sub" datasource. My master template contains this snippet: <subreport> ... <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression> <dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}.getSubDataSourceFromRow("Tasks")]]></ dataSourceExpression> ... </subreport> I'm not sure how to interpret the exception--as its failing deep in the Jasper engine. I tried explicitly casting the datasource with the classname of my custom data source, but it still fails. If anyone can explain what is going on, I'd appreciate it. Thanks! Ken -------------- TRACE.... Error filling print... ENTERED TestDataSourceFactory.getTheDatasource() ENTERED TestDataSource() CONSTRUCTOR ENTERED addRow index=0 ENTERED TestDataSource(List) CONSTRUCTOR ENTERED TestDataSource.putSubDataSourceFromRow() key=Tasks ENTERED addRow index=1 ENTERED TestDataSource(List) CONSTRUCTOR ENTERED TestDataSource.putSubDataSourceFromRow() key=Tasks java.lang.ClassCastException: com.catalystwms.cct.web.beans.reports.TestDataSource at TestDataSource_1154462782283_984118.evaluate(TestDataSource_1154462782283_984118:124) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:556) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:524) at net.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java :601) at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java: 563) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:878) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:689) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:666) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:713) at java.lang.Thread.run(Unknown Source) NESTED BY : java.lang.ClassCastException: com.catalystwms.cct.web.beans.reports.TestDataSource at TestDataSource_1154462782283_984118.evaluate(TestDataSource_1154462782283_984118:124) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:556) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:524) at net.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java :601) at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java: 563) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:878) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:689) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:666) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:713) at java.lang.Thread.run(Unknown Source) NESTED BY : net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : $P{REPORT_DATA_SOURCE} at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:183) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:556) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:524) at net.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java :601) at net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java: 563) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:878) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:689) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:666) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:713) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassCastException: com.catalystwms.cct.web.beans.reports.TestDataSource at TestDataSource_1154462782283_984118.evaluate(TestDataSource_1154462782283_984118:124) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) ... 11 more Print not filled. Try to use an EmptyDataSource...! [file name=TestDataSource-a80125f43b48fad92970e67846f23056.zip size=27835]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TestDataSource-a80125f43b48fad92970e67846f23056.zip[/file]
  20. Hi, I've been trying to get a master and subreport to work using a custom datasource having a hierarchical structure. (See attached .zip file for full details) The datasource is composed of a list of rows (list of Maps with fieldname,value pairs) and associated with each row is a "sub" datasource (containing list of Maps with fieldname,value pairs). However, when I run report, it fails at filling the subreport due to failing at retrieving the "sub" datasource. My master template contains this snippet: <subreport> ... <parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression> <dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}.getSubDataSourceFromRow("Tasks")]]></dataSourceExpression> ... </subreport> I'm not sure how to interpret the exception--as its failing deep in the Jasper engine. I tried explicitly casting the datasource with the classname of my custom data source, but it still fails. If anyone can explain what is going on, I'd appreciate it. Thanks! Ken -------------- TRACE.... ErrorÂfillingÂprint... ENTEREDÂTestDataSourceFactory.getTheDatasource() ENTEREDÂTestDataSource()ÂCONSTRUCTOR ENTEREDÂaddRowÂindex=0 ENTEREDÂTestDataSource(List)ÂCONSTRUCTOR ENTEREDÂTestDataSource.putSubDataSourceFromRow()Âkey=Tasks ENTEREDÂaddRowÂindex=1 ENTEREDÂTestDataSource(List)ÂCONSTRUCTOR ENTEREDÂTestDataSource.putSubDataSourceFromRow()Âkey=Tasks java.lang.ClassCastException:Âcom.catalystwms.cct.web.beans.reports.TestDataSource ÂÂÂÂatÂTestDataSource_1154462782283_984118.evaluate(TestDataSource_1154462782283_984118:124) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:556) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:524) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java:601) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:563) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:878) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:689) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:666) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) ÂÂÂÂatÂit.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:713) ÂÂÂÂatÂjava.lang.Thread.run(UnknownÂSource) NESTEDÂBYÂ: java.lang.ClassCastException:Âcom.catalystwms.cct.web.beans.reports.TestDataSource ÂÂÂÂatÂTestDataSource_1154462782283_984118.evaluate(TestDataSource_1154462782283_984118:124) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:556) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:524) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java:601) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:563) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:878) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:689) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:666) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) ÂÂÂÂatÂit.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:713) ÂÂÂÂatÂjava.lang.Thread.run(UnknownÂSource) NESTEDÂBYÂ: net.sf.jasperreports.engine.fill.JRExpressionEvalException:ÂErrorÂevaluatingÂexpressionÂ:Â ÂÂÂÂSourceÂtextÂ:Â$P{REPORT_DATA_SOURCE} ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:183) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:556) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:524) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setFillParameterValues(JRFillDataset.java:601) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:563) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:878) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:689) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:666) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:89) ÂÂÂÂatÂnet.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601) ÂÂÂÂatÂit.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:713) ÂÂÂÂatÂjava.lang.Thread.run(UnknownÂSource) CausedÂby:Âjava.lang.ClassCastException:Âcom.catalystwms.cct.web.beans.reports.TestDataSource ÂÂÂÂatÂTestDataSource_1154462782283_984118.evaluate(TestDataSource_1154462782283_984118:124) ÂÂÂÂatÂnet.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:172) ÂÂÂÂ...Â11Âmore PrintÂnotÂfilled.ÂTryÂtoÂuseÂanÂEmptyDataSource...! [file name=TestDataSource.zip size=27835]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TestDataSource.zip[/file] [file name=TestDataSource.zip size=27835]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/TestDataSource.zip[/file]
  21. Hi Giulio, I just confirmed that there is a class refresh bug in IReport. Whenever I modify my custom datasource source code, and copy compiled class files into my IReport report folder, IReport does not update report fill with new class. Rather it runs previous version. Whereby, my current solution is to shutdown IReport and restart. Then the new class is recognized by IReport and correctly fills report. I hope someone looks into this matter soon, Thanks! Ken Senior Java Developer Catalyst International, Inc.
  22. Hi Giulio, I started up my machine again this morning and tried out my custom JRDataSourceProvider again. It worked this time! No exception appeared when I clicked Test. I've ran across quite a few problems like this before. There must be many refresh-related bugs in IReport. I think my strategy going forward is to shutdown and restart IReport whenever I see weird behaviour. At least until you guys fix the bugs I'm seeing! Thanks again, Ken
  23. Or here's another solution: If it's decided that subreport jrxml templates are required, why can't Jasper compile all templates into a single .jasper file. Again this with reduce the runtime coding overhead (for precompiled reports) I have as an application developer. Thanks, Ken
  24. This is unfortunate. Why do I need to create a subreport (another file to manage) just to iterate and render detail info within my report? I wish the Jasper engine would allow a SINGLE jrxml template to effectively render both a master "list" of data and an indefinite number of detail "lists" of data. This would lessen the work (and pain) required by application developers like myself in order to use the tool you are supporting in the marketplace. Nonetheless, thanks for sharing your thoughts Lucian! Ken
  25. Hi Giulio Thanks for your quick responses! See snapshot of what I see when I run startup.bat for the 1.2.5 version of IReport. It looks like a command line parameter error -- but perhaps you can make better since of it. I did not modify the startup.bat whatsoever. This is the Java version (not the executable version) that I downloaded from your website. [file name=IReport1.doc size=38400]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/IReport1.doc[/file]
×
×
  • Create New...