Jump to content
We've recently updated our Privacy Statement, available here ×

iswanlund

Members
  • Posts

    5
  • Joined

  • Last visited

iswanlund's Achievements

  1. The subreport wasn't compiling when I saved edits, so bug fixes weren't registering on the main report. When editing a subreport, and want to see it reflected in the main report, click Project->Build Project for the subreport.
  2. Make sure you have removed all margins (report properties->edit page format) and deleted unnecessary parts of layout (like title, page header, etc). Also, change column count to 25.
  3. Make sure you have removed all margins (report properties->edit page format) and deleted unnecessary parts of layout (like title, page header, etc).
  4. Hi sanbez, thank you for taking the time to look at this! Actually, in my zeal to delete unnecessary code I removed an inner join inner join product_orders_for_reports pofr Also, when I remove the subreportParameterExpression and try to run the main report with the subreport hardcoded, I get a String Integer error. The main report sans subreport, and the subreport solo, run perfectly. Are these errors related?
  5. Hello, I am building a report with a subreport, but keep getting the same error. Pertinent report code: <queryString> <![CDATA[select pofr.id as pofrid, from product_orders_for_reports pofr where pofr.id = 1773589]]> </queryString> <field name="pofrid" class="java.lang.Integer"/> <detail> <band height="671" splitType="Stretch"> <subreport> <reportElement x="40" y="450" width="200" height="200" uuid="04e3d2b5-27e3-4cf8-921c-7471b7bda468"/> <subreportParameter name="POFR_ID"> <subreportParameterExpression><![CDATA[1773589]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["consumer_subreport.jasper"]]></subreportExpression> </subreport> </band> </detail> Pertinent subreport code: <parameter name="POFR_ID" class="java.lang.Integer"> <defaultValueExpression><![CDATA["1773589"]]></defaultValueExpression> </parameter> <queryString language="SQL"> <![CDATA[select pofr.id from where pofr.id = $P{POFR_ID}]]> </queryString> And the error text: ......JRException: Error preparing statement for executing the report query: select .... where pofr.id = '?' .......Caused by: .... The column index is out of range: 1, number of columns: 0. Does anyone have an idea why this is happening, and what I can do to fix it? Thanks! EDIT: Also, the subreport runs perfectly fine on its own if the pofr.id is hardcoded, and the report runs fine when no subreport is hooked up. The subreport parameter POFR_ID should take the field variable pofrid from the main report, but I get the same error no matter what is passed into it.
×
×
  • Create New...