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

ho.hince

Members
  • Posts

    10
  • Joined

  • Last visited

ho.hince's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. How to solve it. https://stackoverflow.com/questions/57089674/jasper-horizontal-main-report-causes-the-error-subreport-overflow-on-a-band-th/57093506#57093506
  2. I asked multiple question in this website and in stackoverflow, that improved both my knowledge with Jasper and the quality of my reports. And now, I have a report, that you can find in the answer in the link below: https://stackoverflow.com/questions/57057135/jasper-print-when-create-white-space/57057795#57057795 It works great, just one last problem: The order is vertical. What we can see is Argentina, Brazil, Austria, Canada, etc.. But I want Argentina, Austria, Belgium, Brazil, etc... If I change the print order I get the error : "Subreport overflowed on a band that does not support overflow". How can I solve it? Any ideas? Thanks
  3. Ok, it was actually simple, I just had to move the subreport location to -20px in the x axis. And my chart was not at 0px in the x axis, I corrected it.
  4. What I have, is a report with two column, containing a subreport that will have a chart. And it works, but I have space before the chart, how can I remove it? Image: /sites/default/files/user_uploads/ho.hince/capture_5.png If I preview the subreport: /sites/default/files/user_uploads/ho.hince/capture_6.png In the subreport the space is removed (a little) before the chart. The jrxml files, in the response https://stackoverflow.com/questions/57057135/jasper-print-when-create-white-space
  5. Thanks, what I wanted to do is this: https://community.jaspersoft.com/questions/1140476/simple-example-doesnt-work-correctly
  6. Great answer, but I have the soluiton here: https://stackoverflow.com/questions/57057135/jasper-print-when-create-white-space/
  7. I've created a simple JasperReport example: StackOverflowExample.jrxml: <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.8.0.final using JasperReports Library version 6.8.0-2ed8dfabb690ff337a5797129f2cd92902b0c87b --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="StackOverflowExample" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="749cd048-9a0d-4a00-89bf-1a75a4565943"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/> <property name="com.jaspersoft.studio.data.sql.tables" value=""/> <queryString> <![CDATA[sELECT DISTINCT "ORDERS"."SHIPCOUNTRY" FROM "ORDERS"]]> </queryString> <field name="SHIPCOUNTRY" class="java.lang.String"> <property name="com.jaspersoft.studio.field.label" value="SHIPCOUNTRY"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <background> <band splitType="Stretch"/> </background> <detail> <band height="183"> <subreport> <reportElement x="0" y="0" width="556" height="170" isRemoveLineWhenBlank="true" uuid="4b89b974-f838-4bb7-85b6-1b0f1079c1e6"/> <subreportParameter name="country"> <subreportParameterExpression><![CDATA[$F{SHIPCOUNTRY}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["StackOverflowExampleSubReport.jasper"]]></subreportExpression> </subreport> </band> </detail> </jasperReport> And the subreport, StackOverflowExampleSubReport.jrxml: <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.8.0.final using JasperReports Library version 6.8.0-2ed8dfabb690ff337a5797129f2cd92902b0c87b --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="StackOverflowExample" columnCount="2" printOrder="Horizontal" pageWidth="595" pageHeight="842" columnWidth="277" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="749cd048-9a0d-4a00-89bf-1a75a4565943"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/> <property name="com.jaspersoft.studio.data.sql.tables" value=""/> <parameter name="country" class="java.lang.String"> <defaultValueExpression><![CDATA["France"]]></defaultValueExpression> </parameter> <queryString> <![CDATA[sELECT "ORDERS"."ORDERDATE", "ORDERS"."FREIGHT" FROM "ORDERS" WHERE "ORDERS"."SHIPCOUNTRY" = $P{country}]]> </queryString> <field name="ORDERDATE" class="java.sql.Timestamp"> <property name="com.jaspersoft.studio.field.label" value="ORDERDATE"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <field name="FREIGHT" class="java.math.BigDecimal"> <property name="com.jaspersoft.studio.field.label" value="FREIGHT"/> <property name="com.jaspersoft.studio.field.tree.path" value="ORDERS"/> </field> <background> <band splitType="Stretch"/> </background> <detail> <band height="160"> <lineChart> <chart evaluationTime="Report"> <reportElement x="15" y="5" width="255" height="155" isRemoveLineWhenBlank="true" uuid="3b5f7d89-490b-468f-9112-f606f4eda437"> <printWhenExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()==1)]]></printWhenExpression> </reportElement> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <categoryDataset> <categorySeries> <seriesExpression><![CDATA[$P{country}]]></seriesExpression> <categoryExpression><![CDATA[$F{ORDERDATE}]]></categoryExpression> <valueExpression><![CDATA[$F{FREIGHT}]]></valueExpression> </categorySeries> </categoryDataset> <linePlot> <plot/> <categoryAxisFormat> <axisFormat labelColor="#000000" tickLabelColor="#000000" axisLineColor="#000000"/> </categoryAxisFormat> <valueAxisFormat> <axisFormat labelColor="#000000" tickLabelColor="#000000" axisLineColor="#000000"/> </valueAxisFormat> </linePlot> </lineChart> </band> </detail> </jasperReport> The report use the sample DB, and here are the screen shoot: SubReport, with the parameter country set to "France", it contain the first page as below and 7 other empty pages./sites/default/files/user_uploads/ho.hince/capture.png MainReport, The first two page as below, a total of 93 pages, most of them which are empty/sites/default/files/user_uploads/ho.hince/capture_0.png/sites/default/files/user_uploads/ho.hince/capture_1.png
  8. I have a report with two column, in the column I have a subreport, the report compile if the subreport only contain one element, otherwise I have a : Subreport overflowed on a band that does not support overflow. /sites/default/files/user_uploads/ho.hince/report_sub_report_paint.png
  9. I found the solution, my title band was too big in the SubReport.
  10. I have a Report that contains a SubReport, that also contains a SubReport. /sites/default/files/user_uploads/ho.hince/xldeploy.png When I create the SubReport everything is fine and good. But In the main Report, I have a spacing at the end of each page, and I have an empty page at the end of the report, do you have any idea, why it could happen? /sites/default/files/user_uploads/ho.hince/xldeploymain.png ReportO.jrxml:
×
×
  • Create New...