rusindes
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forum
Events
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Security Advisories
Downloads
Posts posted by rusindes
-
-
I am trying to create the subreport in the main report only with the static texts.
Main report:
<?xml version="1.0" encoding="UTF-8"?><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="report1" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f175bd48-f661-425f-a3e1-763996d44ca7"> <property name="ireport.zoom" value="1.3310000000000004"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["C:eclipse_workplaceesd01srcappapp-gendocgendoc-implsrcmainresourcestemplatesjasper"]]></defaultValueExpression> </parameter> <background> <band splitType="Stretch"/> </background> <title> <band height="79" splitType="Stretch"> <staticText> <reportElement x="0" y="0" width="100" height="20" uuid="a0319d8a-68cd-447a-8889-301e0d0139e3"/> <text><![CDATA[Hello Title]]></text> </staticText> </band> </title> <detail> <band height="125" splitType="Stretch"> <staticText> <reportElement x="0" y="0" width="100" height="20" uuid="471d80ae-9da4-4944-911a-f90acb8e0e91"/> <text><![CDATA[Hello Detail]]></text> </staticText> <subreport> <reportElement x="114" y="20" width="641" height="79" uuid="beace73f-401b-4406-a8b4-603a3df43a9e"/> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "report1_subreport1.jasper"]]></subreportExpression> </subreport> </band> </detail> <pageFooter> <band height="54" splitType="Stretch"> <staticText> <reportElement x="0" y="0" width="100" height="20" uuid="513068b2-28cf-4d3e-a2f5-fd57d9cdcc3b"/> <text><![CDATA[Hello Footer]]></text> </staticText> </band> </pageFooter></jasperReport>[/code]
Subreport:
xml:
<?xml version="1.0" encoding="UTF-8"?><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="report1_subreport1" language="groovy" pageWidth="802" pageHeight="555" orientation="Landscape" columnWidth="802" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="57901f58-6d39-40b8-9972-7f2dfff24f53"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <detail> <band height="125" splitType="Stretch"> <staticText> <reportElement x="325" y="45" width="143" height="35" uuid="6977bf0b-7047-495c-b1e1-af3010a8cd39"/> <textElement> <font size="24"/> </textElement> <text> <![CDATA[Hello World]]> </text> </staticText> </band> </detail></jasperReport>[/code]
Now, when I am trying click to preview button from the main report, the subreport is not displayed. What am I doing wrong?
Preview from main report:
Jasper table and textfields inside the list component with XML datasource
in Products
Posted
I am trying to generate report using Jasper iReport Designer 5.6.0, where is list with table and some textfields. The generated report could look like this:
To do this, I'm using the following XML file as datasource:
And JRXML template:
And this is what I'm getting as resulting report:
What can I do? Any ideas? Thank you !