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

nathan14

Members
  • Posts

    4
  • Joined

  • Last visited

nathan14's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. When using two templates to create a report (say for example one for a fax cover sheet and the other for the fax data), does one template have any access/visibility to the other?
  2. Is it a best practice to apply only one jrxml to a particular report? Asked another way, is it uncommon to create a report out of two or more jrxml's?
  3. I've blanked out the actual field names, CDATA values, etc. for confidentiality purposes. Cover Page <?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="" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <property name="i" value=""/> <parameter name="logo" class="java.io.InputStream"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <background> <band splitType="Stretch"/> </background> <title> <band height="60" splitType="Stretch"> <image> <reportElement x="349" y="0" width="100" height="50"/> <imageExpression class="java.io.InputStream"><![CDATA[$P{logo}]]></imageExpression> </image> </band> </title> <detail> <band height="315" splitType="Stretch"> <staticText> <reportElement x="10" y="0" width="59" height="20"/> <textElement> <font fontName="Arial" size="12" isBold="true"/> </textElement> <text><![CDATA[To:]]></text> </staticText> <staticText> <reportElement x="10" y="40" width="55" height="20"/> <textElement> <font fontName="Arial" size="12" isBold="true"/> </textElement> <text><![CDATA[Fax:]]></text> </staticText> <staticText> <reportElement x="10" y="80" width="54" height="20"/> <textElement> <font fontName="Arial" size="12" isBold="true"/> </textElement> <text><![CDATA[From:]]></text> </staticText> <staticText> <reportElement x="10" y="120" width="55" height="20"/> <textElement> <font fontName="Arial" size="12" isBold="true"/> </textElement> <text><![CDATA[ RE:]]></text> </staticText> <staticText> <reportElement x="10" y="160" width="49" height="20"/> <textElement> <font fontName="Arial" size="12" isBold="true"/> </textElement> <text><![CDATA[Date:]]></text> </staticText> <staticText> <reportElement x="10" y="200" width="49" height="20"/> <textElement> <font fontName="Arial" size="12" isBold="true"/> </textElement> <text><![CDATA[# Pages ]]></text> </staticText> <staticText> <reportElement x="60" y="201" width="135" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <text><![CDATA[(Including Cover Sheet)]]></text> </staticText> <textField evaluationTime="Report"> <reportElement x="200" y="200" width="100" height="20"/> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> </textField> <staticText> <reportElement x="10" y="240" width="100" height="20"/> <textElement> <font fontName="Arial" size="12" isBold="true"/> </textElement> <text><![CDATA[ Message:]]></text> </staticText> <line> <reportElement x="10" y="20" width="500" height="1"/> </line> <line> <reportElement x="10" y="60" width="500" height="1"/> </line> <line> <reportElement x="10" y="100" width="500" height="1"/> </line> <line> <reportElement x="10" y="140" width="500" height="1"/> </line> <line> <reportElement x="10" y="180" width="500" height="1"/> </line> <line> <reportElement x="10" y="220" width="500" height="1"/> </line> <staticText> <reportElement x="10" y="281" width="100" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <text><![CDATA[Request_]]></text> </staticText> <textField> <reportElement x="64" y="6" width="386" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{}]]></textFieldExpression> </textField> <textField> <reportElement x="60" y="40" width="386" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{}]]></textFieldExpression> </textField> <textField isBlankWhenNull="true"> <reportElement x="60" y="85" width="382" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{}]]></textFieldExpression> </textField> <textField> <reportElement x="267" y="120" width="175" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{}]]></textFieldExpression> </textField> <staticText> <reportElement x="64" y="120" width="193" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <text><![CDATA[]]></text> </staticText> <textField> <reportElement x="64" y="160" width="378" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{}]]></textFieldExpression> </textField> <textField> <reportElement x="110" y="281" width="55" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{}]]></textFieldExpression> </textField> <staticText> <reportElement x="165" y="281" width="15" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <text><![CDATA[ -- ]]></text> </staticText> <textField> <reportElement x="180" y="281" width="174" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{}]]></textFieldExpression> </textField> </band> </detail> <pageFooter> <band height="188" splitType="Stretch"> <line> <reportElement x="2" y="0" width="500" height="1"/> </line> <staticText> <reportElement x="1" y="3" width="448" height="74"/> <textElement markup="html"> <font fontName="Arial" size="10"/> </textElement> <text><![CDATA[.]]></text> </staticText> <staticText> <reportElement x="2" y="89" width="170" height="20"/> <textElement> <font fontName="Arial" size="12" isBold="true"/> </textElement> <text><![CDATA[]]></text> </staticText> <textField isBlankWhenNull="true"> <reportElement x="172" y="89" width="127" height="20"/> <textElement> <font fontName="Arial" size="12"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{}]]></textFieldExpression> </textField> </band> </pageFooter> </jasperReport> Report Pages <?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="Blank" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <parameter name="" class="java.lang.String"/> <parameter name="" class="java.lang.String"/> <parameter name="" class="java.lang.String"/> <parameter name="" class="java.lang.String"/> <parameter name="" class="java.lang.String"/> <parameter name="logo" class="java.io.InputStream"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name=" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <field name="" class="java.lang.String"/> <background> <band splitType="Stretch"/> </background> <title> <band height="140" splitType="Stretch"> <image> <reportElement x="349" y="0" width="100" height="50"/> <imageExpression class="java.io.InputStream"><![CDATA[$P{logo}]]></imageExpression> </image> <staticText> <reportElement x="296" y="55" width="161" height="18"/> <textElement textAlignment="Center"/> <text><![CDATA[]]></text> </staticText> <staticText> <reportElement x="310" y="73" width="132" height="14"/> <textElement textAlignment="Center"/> <text><![CDATA[* * * CONFIDENTIAL * * * ]]></text> </staticText> </band> </title> <pageHeader> <band height="77" splitType="Stretch"> <staticText> <reportElement x="224" y="33" width="24" height="20"/> <textElement/> <text><![CDATA[ ]]></text> </staticText> <textField> <reportElement x="248" y="33" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{} + " "]]></textFieldExpression> </textField> <textField> <reportElement x="635" y="33" width="117" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{} + " "]]></textFieldExpression> </textField> <textField> <reportElement x="354" y="33" width="161" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{} + " "]]></textFieldExpression> </textField> <staticText> <reportElement x="555" y="33" width="80" height="20"/> <textElement/> <text><![CDATA[ ]]></text> </staticText> <textField evaluationTime="Now"> <reportElement x="22" y="13" width="63" height="20"/> <textElement textAlignment="Left"/> <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" "]]></textFieldExpression> </textField> <textField> <reportElement x="100" y="13" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{}]]></textFieldExpression> </textField> <staticText> <reportElement x="22" y="33" width="88" height="20"/> <textElement/> <text><![CDATA[ ]]></text> </staticText> <textField> <reportElement x="114" y="33" width="73" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{}]]></textFieldExpression> </textField> </band> </pageHeader> <columnHeader> <band height="47"> <staticText> <reportElement x="0" y="0" width="110" height="20"/> <textElement/> <text><![CDATA[ ]]></text> </staticText> <staticText> <reportElement x="114" y="0" width="58" height="20"/> <textElement/> <text><![CDATA[]]></text> </staticText> <staticText> <reportElement x="172" y="0" width="59" height="20"/> <textElement/> <text><![CDATA[]></text> </staticText> <staticText> <reportElement x="231" y="0" width="85" height="20"/> <textElement/> <text><![CDATA[ ]]></text> </staticText> <staticText> <reportElement x="318" y="0" width="58" height="20"/> <textElement/> <text><![CDATA[]]></text> </staticText> <staticText> <reportElement x="376" y="0" width="60" height="20"/> <textElement/> <text><![CDATA[ ]]></text> </staticText> <staticText> <reportElement x="436" y="0" width="73" height="20"/> <textElement/> <text><![CDATA[ ]]></text> </staticText> <staticText> <reportElement x="509" y="0" width="108" height="20"/> <textElement/> <text><![CDATA[]]></text> </staticText> <staticText> <reportElement x="617" y="0" width="39" height="20"/> <textElement/> <text><![CDATA[]]></text> </staticText> <staticText> <reportElement x="656" y="0" width="24" height="20"/> <textElement/> <text><![CDATA[ ]]></text> </staticText> <staticText> <reportElement x="680" y="0" width="72" height="20"/> <textElement/> <text><![CDATA[ ]]></text> </staticText> <staticText> <reportElement x="0" y="20" width="110" height="20"/> <textElement/> <text><![CDATA[]]></text> </staticText> <line> <reportElement x="10" y="40" width="732" height="1"/> </line> </band> </columnHeader> <detail> <band height="46" splitType="Stretch"> <textField> <reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="110" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{} +" "]]></textFieldExpression> </textField> <textField> <reportElement x="114" y="0" width="58" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{]]></textFieldExpression> </textField> <textField> <reportElement x="172" y="0" width="59" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{]]></textFieldExpression> </textField> <textField> <reportElement x="231" y="0" width="85" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{]]></textFieldExpression> </textField> <textField> <reportElement x="318" y="0" width="58" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{}+" "]]></textFieldExpression> </textField> <textField> <reportElement x="376" y="0" width="60" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{]]></textFieldExpression> </textField> <textField> <reportElement x="509" y="0" width="108" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{]></textFieldExpression> </textField> <textField> <reportElement x="436" y="0" width="73" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{} + " "]]></textFieldExpression> </textField> <textField> <reportElement x="617" y="0" width="39" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{]]></textFieldExpression> </textField> <textField> <reportElement x="656" y="0" width="24" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{ext} + " "]]></textFieldExpression> </textField> <textField> <reportElement x="680" y="0" width="72" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{]]></textFieldExpression> </textField> <textField> <reportElement x="0" y="16" width="752" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{]]></textFieldExpression> </textField> <line> <reportElement x="10" y="36" width="732" height="1"/> </line> </band> </detail> <pageFooter> <band height="55" splitType="Stretch"> <staticText> <reportElement x="223" y="1" width="306" height="20"/> <textElement/> <text><![CDATA[]></text> </staticText> <staticText> <reportElement x="100" y="21" width="552" height="20"/> <textElement/> <text><![CDATA[.]]></text> </staticText> </band> </pageFooter> <summary> <band height="39" splitType="Stretch"/> </summary> </jasperReport>
  4. I've created a report out of two jrxml's. The first jrxml represents a "Fax Cover Page". The other jrxml represnts the details of the report. I want to list the total number of pages on the so called "cover sheet" , but the total pages count is always '1'.. Is this because there are two jrxml's, the first of which is the "Cover Page", and it will only count page numbers per jrxml? I'm generating a PDF, and it works fine except for the page number count.. Here is how I have it in the jrxml: <textField evaluationTime="Report"> <reportElement x="200" y="200" width="100" height="20"/> <textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> </textField> This is in a detail section. Thanks, Nathan
×
×
  • Create New...