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

nagar.hemant

Members
  • Posts

    4
  • 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 nagar.hemant

  1. No, I have not created any group for subreport. My subreports are in summary band.
  2. Hi, I have a main report containing multiple sub-reports. The report output is fine when the sub-report has data. But when the sub-reports have no data to display except for the last sub-report then the report output has blank page in between in the report. There's no space between the subreports or after the last one, and I have checked remove Line When Blank property as well. Any suggestion will be very helpful. Thanks in advance!!! Below is the Sample JRXML file: <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version last--><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="Master" pageWidth="612" pageHeight="930" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isSummaryWithPageHeaderAndFooter="true" uuid="a6845957-9e39-46d7-8317-610babb59131"><property name="com.jaspersoft.studio.unit." value="pixel"/><property name="com.jaspersoft.studio.data.defaultdataadapter" value="XML report"/> <title><band height="85"><textField isStretchWithOverflow="true" isBlankWhenNull="true"><reportElement style="Main Header" positionType="FixRelativeToBottom" x="280" y="20" width="292" height="45" uuid="a52dd17f-7215-40c6-938b-6608e930c28a"><property name="local_mesure_unity" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="px"/><property name="local_mesure_unitheight" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="px"/><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/><printWhenExpression><![CDATA[$V{PAGE_NUMBER}==1]]></printWhenExpression></reportElement><textElement textAlignment="Right" verticalAlignment="Middle"><font size="20"/></textElement><textFieldExpression><![CDATA["Sample Title"]]></textFieldExpression></textField></band></title><pageFooter><band height="17" splitType="Stretch"><property name="local_mesure_unitheight" value="pixel"/><textField><reportElement x="214" y="0" width="66" height="17" uuid="e2744664-9ade-475e-b5e0-1bd361bb8dd5"><property name="local_mesure_unity" value="pixel"/></reportElement><textElement textAlignment="Right" verticalAlignment="Bottom"/><textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression></textField><textField evaluationTime="Report"><reportElement x="280" y="0" width="66" height="17" uuid="06b5c34f-bd4c-47c8-8dee-931a4e21f3d9"><property name="local_mesure_unity" value="pixel"/></reportElement><textElement textAlignment="Left" verticalAlignment="Bottom"/><textFieldExpression><![CDATA[" of " + $V{PAGE_NUMBER}]]></textFieldExpression></textField></band></pageFooter><lastPageFooter><band height="17"><property name="local_mesure_unitheight" value="pixel"/><textField evaluationTime="Report"><reportElement x="280" y="0" width="66" height="17" uuid="58675e54-d79d-4874-98e1-1ac4af3c11b5"><property name="local_mesure_unity" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="px"/></reportElement><textElement textAlignment="Left" verticalAlignment="Bottom"/><textFieldExpression><![CDATA[" of " + $V{PAGE_NUMBER}]]></textFieldExpression></textField><textField><reportElement x="214" y="0" width="66" height="17" uuid="b29ac8e2-6cc2-4ca2-b785-86f8e7429859"><property name="local_mesure_unity" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="px"/></reportElement><textElement textAlignment="Right" verticalAlignment="Bottom"/><textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression></textField></band></lastPageFooter><summary><band height="750" splitType="Stretch"><property name="local_mesure_unitheight" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="px"/><subreport><reportElement x="0" y="0" width="572" height="20" isRemoveLineWhenBlank="true" uuid="656d6daa-e99d-4fa2-9513-ffbb5ac6d97f"><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/><property name="local_mesure_unitheight" value="pixel"/><property name="local_mesure_unitx" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="px"/><property name="com.jaspersoft.studio.unit.height" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport1.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="0" y="20" width="270" height="20" uuid="e9d9e010-96ec-43fe-84bf-2fba6cac5f28"><property name="local_mesure_unity" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport2.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="0" y="50" width="572" height="20" isRemoveLineWhenBlank="true" uuid="5837ed80-6289-4a8f-8587-c605af76af01"><property name="local_mesure_unity" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="px"/><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/><property name="local_mesure_unitheight" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="px"/><property name="local_mesure_unitx" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport3.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="0" y="70" width="572" height="100" isRemoveLineWhenBlank="true" uuid="de606433-64a1-474c-b3d2-52751c040e64"><property name="local_mesure_unity" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="px"/><property name="local_mesure_unitheight" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="px"/><property name="local_mesure_unitx" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport4.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="0" y="470" width="572" height="100" isRemoveLineWhenBlank="true" uuid="898d3a73-ccbd-4faf-980f-69e06035ba1d"><property name="local_mesure_unitx" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="px"/><property name="local_mesure_unity" value="pixel"/><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/><property name="local_mesure_unitheight" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="px"/><property name="com.jaspersoft.studio.unit.height" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport5.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="0" y="270" width="572" height="100" isRemoveLineWhenBlank="true" uuid="4204dac3-8649-4075-bfb6-8da94b3cfff4"><property name="local_mesure_unity" value="pixel"/><property name="local_mesure_unitheight" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="px"/><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/><property name="com.jaspersoft.studio.unit.y" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport6.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="0" y="570" width="572" height="100" isRemoveLineWhenBlank="true" uuid="df481466-5775-4592-bb79-ea262a287821"><property name="local_mesure_unitx" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="px"/><property name="local_mesure_unitheight" value="pixel"/><property name="local_mesure_unity" value="pixel"/><property name="com.jaspersoft.studio.unit.y" value="px"/><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/><property name="com.jaspersoft.studio.unit.height" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport7.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="0" y="670" width="572" height="80" isRemoveLineWhenBlank="true" uuid="073b884a-ad50-4f2b-912f-a035f70db67b"><property name="local_mesure_unity" value="pixel"/><property name="local_mesure_unitheight" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="px"/><property name="com.jaspersoft.studio.unit.y" value="px"/><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport8.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="0" y="170" width="572" height="100" isRemoveLineWhenBlank="true" uuid="cf2a1b23-8658-4b1b-a565-08e9372d3d83"><property name="local_mesure_unity" value="pixel"/><property name="local_mesure_unitheight" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="px"/><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/><property name="com.jaspersoft.studio.unit.y" value="px"/><property name="local_mesure_unitx" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport9.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="210" y="30" width="220" height="20" uuid="9e6c0941-42c9-4546-9cd3-9828344f1dca"><property name="local_mesure_unity" value="pixel"/><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/><property name="local_mesure_unitx" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="px"/><property name="com.jaspersoft.studio.unit.y" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport10.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="380" y="30" width="192" height="20" uuid="efdbabe7-8944-427e-ad2a-9e0347eb388c"><property name="local_mesure_unity" value="pixel"/><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/><property name="local_mesure_unitx" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="px"/><property name="com.jaspersoft.studio.unit.y" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport11.jasper"]]></subreportExpression></subreport><subreport><reportElement positionType="Float" x="0" y="370" width="572" height="100" isRemoveLineWhenBlank="true" uuid="efdacbcc-ee78-4cdb-9f54-184b29670e75"><property name="local_mesure_unity" value="pixel"/><property name="local_mesure_unitheight" value="pixel"/><property name="com.jaspersoft.studio.unit.height" value="px"/><property name="local_mesure_unitwidth" value="pixel"/><property name="com.jaspersoft.studio.unit.width" value="px"/><property name="com.jaspersoft.studio.unit.y" value="px"/><property name="local_mesure_unitx" value="pixel"/><property name="com.jaspersoft.studio.unit.x" value="px"/></reportElement><parametersMapExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}]]></parametersMapExpression><connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression><subreportExpression><![CDATA["Subreport12.jasper"]]></subreportExpression></subreport></band></summary></jasperReport>
  3. Hi, I have a report with many sub-reports. Each sub-report has data displayed in a tabular format. I am exporting the report in PDF Format. When I export the report to PDF, some sub-reports print just the header as there is not enough space to print the data on the page. The header and data printed properly in the next page. I wish to print the sub-report only when there is enough space to print atleast one row of data on the page. Is there any way to achieve this in Jaspersoft Studio. I am using Jaspersoft Studio 5.5. I have attached the image of the issue I am facing. Thanks in advance!!! Hemant
  4. Hi, I have a report with XML as data source. The main report contains many List Components. I have to sort the data in the main report by adding a field in the Sorting Tab of Query Dialog. But when I do that I get the following error: net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/xyz/abc") at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:482) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$18(ReportControler.java:457) at com.jaspersoft.studio.editor.preview.view.control.ReportControler$4.run(ReportControler.java:347) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression : Source text : ((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/xyz/abc") at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:244) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:591) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:559) at net.sf.jasperreports.components.list.FillDatasetRun.evaluate(FillDatasetRun.java:127) at net.sf.jasperreports.components.list.BaseFillList.evaluate(BaseFillList.java:102) at net.sf.jasperreports.engine.fill.JRFillComponentElement.evaluate(JRFillComponentElement.java:110) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:259) at net.sf.jasperreports.engine.fill.JRFillFrame.evaluate(JRFillFrame.java:149) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:259) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:456) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2057) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:778) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:288) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:151) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:932) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassCastException: net.sf.jasperreports.engine.fill.SortedDataSource cannot be cast to net.sf.jasperreports.engine.data.JRXmlDataSource...at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:231) ... 16 more I found the following work around in the community:http://community.jaspersoft.com/questions/817335/sorting-ireport-does-not-work-subreportBut when I tried to implement it, I get the following error: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:1. JRXmlUtils cannot be resolved value = JRXmlUtils.createDocument(((java.lang.Object)field_node.getValue()), true); //$JR_EXPR_ID=29$ <-------->2. JRXmlUtils cannot be resolved value = JRXmlUtils.createDocument(((java.lang.Object)field_node.getOldValue()), true); //$JR_EXPR_ID=29$ <-------->3. JRXmlUtils cannot be resolved value = JRXmlUtils.createDocument(((java.lang.Object)field_node.getValue()), true); //$JR_EXPR_ID=29$ <-------->3 errors at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:204) at net.sf.jasperreports.eclipse.builder.JasperReportCompiler.compileReport(JasperReportCompiler.java:167) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.compileJasperDesign(ReportControler.java:405) at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$14(ReportControler.java:396) at com.jaspersoft.studio.editor.preview.view.control.ReportControler$4.run(ReportControler.java:329) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)I would appreciate if anyone could help me with this issue. Thanks in advance...
×
×
  • Create New...