2002 JI Open Discussion Posted August 18, 2006 Share Posted August 18, 2006 By: Henrik S. Larsen - skafsgaard Reset page number 2003-08-20 06:36 I think I've seen this before, but can't find it. So - I have a report where the title page is defined by a subreport. Bot the title and detail section of the subreport contains data. This means that when the detail section of the master report starts printing, it starts with page no 4. Or anything greater than 1. Is it possible to either reset the page number or avoid using the page number in the subreport. So the counting starts in the master report. mvh / regards Henrik Skafsgaard Larsen By: Teodor Danciu - teodord RE: Reset page number 2003-08-20 07:24 Hi, The only way to reset the page number is by using the isResetPageNumber="true" available for groups. Just place a dummy group in your master report, with an empty expression and without header and footer bands, just with this flag set to true. <group name="MyDummyGroup" isResetPageNumber="true"/> This should be the first (top) group in your master report. I hope this helps. Teodor By: Henrik S. Larsen - skafsgaard RE: Reset page number 2003-08-21 23:47 Hi, I'm sorry to say - it did not. The page number still starts with something greater than 1. The first group looks like this: <group name="ResetPageNumber" isResetPageNumber="true" isStartNewColumn="false" isStartNewPage="false" isReprintHeaderOnEachPage="false" minHeightToStartNewPage="0" /> The only thing I defined is the group name and isResetPageNumber="true" The rest must be default values. mvh / regards Henrik Link to comment Share on other sites More sharing options...
fsimard Posted November 7, 2008 Share Posted November 7, 2008 Hello ThedorI try the trick to add a dummy group with the isResetPageNumber to true and is not workingI have a title page with the isTitleNewPage="true" and the content still start at page 2do you have any trick i can try to reset the page number. Tks for the help Code:<jasperReport name="BaseIndividualReport" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="612" pageHeight="792" columnWidth="572" columnSpacing="0" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30" whenNoDataType="NoPages" isTitleNewPage="true" isSummaryNewPage="true"scriptletClass="com.individual.jasper.HeadingsScriptlet"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <field name="id" class="java.lang.String"/> <variable name="HeadingsCollection" class="java.util.Collection" resetType="Report" calculation="System"> <initialValueExpression><![CDATA[new java.util.ArrayList()]]></initialValueExpression> </variable> <group name="MyDummyGroup" isResetPageNumber="true"/> <group name="Introduction0" > <groupExpression /> <groupHeader> etc ... Link to comment Share on other sites More sharing options...
teodord Posted November 12, 2008 Share Posted November 12, 2008 Hi,If you know your title section takes one page, why don't you display (PAGE_NUMBER - 1) on all subsequent pages?I hope this helps.Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now