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

shanid25

Members
  • Posts

    3
  • 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 shanid25

  1. thanks, tchen .. I was in vacation ... srry for the delay in response. we were using two text box solution before, but new requirements says "page X of Y " needs to be right aligned , we could not properly align the two box such a way that the right most text box to be right aligned, if we make it as right most text box as right aligned then there were extra spaces in between and alignments were not proper.
  2. Thanks for the answer Tchen and Hozawa, But this issue happens when there exist a footer for a group, I just made few changes in your sample jrxml and issue still there , Please find below the sample jrxml. you can see in the output that instead of Page Number 3 it is being displayed as page number 2. <?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="-Printing Page X of Y" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="808f470e-8195-48b4-95af-6b7b557b5900"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <queryString> <![CDATA[select 1 as n, 'This page has' as t union all select 2 as n, 'two records.' as t union all select 11 as n, 'This page has' as t union all select 12 as n, 'three records.' as t union all select 13 as n, 'three records.' as t union all select 14 as n, 'three records.' as t union all select 21 as n, 'This page has one record' as t]]> </queryString> <field name="t" class="java.lang.String"/> <field name="n" class="java.lang.String"/> <variable name="currentPage" class="java.lang.Integer" resetType="Page"> <variableExpression> <![CDATA[$V{PAGE_NUMBER}]]> </variableExpression> </variable> <variable name="groupA" class="java.lang.Integer"> <variableExpression> <![CDATA[(Integer.valueOf($F{n})).intValue()/10]]> </variableExpression> </variable> <group name="groupA" isStartNewPage="true"> <groupExpression> <![CDATA[$V{groupA}]]> </groupExpression> <groupFooter> <band height="50"> <textField> <reportElement uuid="6e98534c-131f-469f-9c4f-dd1de1509da3" x="100" y="16" width="300" height="20" forecolor="#FF0000"/> <textElement> <font isBold="true"/> </textElement> <textFieldExpression> <![CDATA["TOTAL NUMBER OF RECORDS PROCESSED: "+$V{REPORT_COUNT}]]> </textFieldExpression> </textField> </band> </groupFooter> </group> <background> <band splitType="Stretch"/> </background> <title> <band splitType="Stretch"/> </title> <pageHeader> <band splitType="Stretch"/> </pageHeader> <columnHeader> <band height="183" splitType="Stretch"> <staticText> <reportElement uuid="e9eba606-0d40-4bcc-91d4-e22840dc8bf0" x="0" y="0" width="100" height="156"/> <textElement/> <text> <![CDATA[Record ID]]> </text> </staticText> <staticText> <reportElement uuid="7b977850-d1f4-45bd-9bf4-fc02d20d133e" x="100" y="0" width="300" height="156"/> <textElement/> <text> <![CDATA[Text]]> </text> </staticText> </band> </columnHeader> <detail> <band height="130" splitType="Stretch"> <textField> <reportElement uuid="b897c39c-5173-4d46-a209-d160dcbd1470" x="0" y="0" width="100" height="115"/> <textElement/> <textFieldExpression> <![CDATA[$F{n}]]> </textFieldExpression> </textField> <textField> <reportElement uuid="3709cf54-f416-4a11-bc71-d1ac1e8ee85b" x="100" y="0" width="300" height="115"/> <textElement/> <textFieldExpression> <![CDATA[$F{t}]]> </textFieldExpression> </textField> </band> </detail> <columnFooter> <band splitType="Stretch"/> </columnFooter> <pageFooter> <band height="30" splitType="Stretch"> <textField evaluationTime="Auto"> <reportElement uuid="9235df5b-723e-4e89-9ac7-1c3ba33c807d" x="0" y="0" width="572" height="20" forecolor="#00CC33"/> <textElement textAlignment="Center"> <font isItalic="true"/> </textElement> <textFieldExpression> <![CDATA["Page "+$V{currentPage}+" of " + $V{PAGE_NUMBER}]]> </textFieldExpression> </textField> </band> </pageFooter> <summary> <band height="30" splitType="Stretch"/> </summary> </jasperReport>[/code]
  3. Printing Page X of Y in a Single Textfield logic is breaking when a new page printed with only group footer details. using Jaspersoft iReport Designer 5.1.0 version Created variable as below : <variable name="currentPageNumber" class="java.lang.Integer" resetType="Page" incrementType="Page"><variableExpression><![CDATA[$V{PAGE_NUMBER}]]></variableExpression></variable> Page number Field :<textField evaluationTime="Auto"><reportElement uuid="847e339f-a1a6-492d-868b-b233f71785b4" x="166" y="22" width="100" height="20"/><textElement/><textFieldExpression><![CDATA[$V{currentPageNumber} + " of " + $V{PAGE_NUMBER}]]></textFieldExpression></textField> Created a New group Account with print on new page as true, when the new page has only footer part then the page number is showing the page number of previous page. Please help.......... Please find below comment for the sample jrxml to reproduce this issue.
×
×
  • Create New...