PDA

View Full Version : Total number of Pages in the footer



Anonymous
09-20-2002, 10:09 AM
Hi,

Is there a way to put the total number of pages in the footer of a report? I would extend the current footer information which only containg the current page number.

Regards,

Zoltan

Anonymous
09-20-2002, 11:59 AM
Hi Zoltan,

I got this to work with the following functions and expressions in the XML report template:


<function name="PageNumber"
class="com.jrefinery.report.function.PageFunction"/>


<function name="PageTotal"
class="com.jrefinery.report.function.ReportPropertyFunction">
<properties>
<property name="reportProperty">report.pagecount</property>
</properties>
</function>


<expression name="PageNofM"
class="com.jrefinery.report.function.TextFormatExpression">
<properties>
<property name="pattern">Page {0,number,integer} of {1,number,integer}</property>
<property name="0">PageNumber</property>
<property name="1">PageTotal</property>
</properties>
</expression>

...and this for the page footer:



<pagefooter height="14"
onfirstpage="true" onlastpage="true"
fontname="SansSerif" fontstyle="plain" fontsize="9">

<string-function name="pagenofm"
function="PageNofM"
x="0" y="3" width="100%" height="9"
alignment="right"/>

</pagefooter>

Regards,

DG.

Anonymous
09-24-2002, 02:11 AM
Hi,David,
I use JfreeReport to generate my report,but there is a problem.
The pageCount of my report is not right.It looks like a random
number.Each time I regenerate the report with the same xml
file and the same data,I got different pageCount.The pagenumber
is right.

My xml looks like this:
<?xml version="1.0" encoding="GB2312"?>
<!--
<!DOCTYPE report SYSTEM "http://jfreereport.sourceforge.net/report.dtd">

-->
<!--
ChangeLog:
2002-May-20: Adjusted the width of 0 to be "100%". The parser does translate values of 0 to
the full width, but will issue at least a warning.
The element width of "Country Element" was unreasonably low and is now 176.

-->
<report name="

Anonymous
09-24-2002, 02:14 AM
Hi,David
I have tried to use the expression PageNOfM to replace the pagecount.
It does not work ,either.The result is "Page 2 of NUll"

what should I do?

Thanks:)

Anonymous
09-25-2002, 04:02 AM
Hmm, this is strange. I've verified that this is working for me (on Linux), and I can't see any problem with the way you've specified the 'pagecount' property. Something must be going on, but I can't see what...

Regards,

DG.

Anonymous
09-25-2002, 08:52 PM
Hi,
I found something strange now.When some of the group fields contain
null value,the pagecount property become wield.But if I delete all the
null value of the group fields,the pagecount shows right.
I do not know the reason,but now,it works well for me after deleting
the null value from the group fields.
Thank u:)

Regards,
tsingt

Anonymous
09-26-2002, 02:06 AM
Hi tsingt,
I have the same problem with you when i use 0.7.5.. but when i change version into 0.7.6 everythings work fine...
... if you already use 0.7.6 ... i'm sorry.

Anonymous
09-30-2002, 12:50 PM
Hi,

is this problem still unresolved? If so I'll have a look at it ...

Have more fun,
said Thomas

Anonymous
10-15-2002, 06:14 PM
Hi,

ha! the one was lost ... i found that thing while cleaning my notes ... restarted investigation here ... tomorrow :) it's midnight now and the ghosts are getting active :)

Have more fun,
said Thomas

Anonymous
10-21-2002, 06:16 AM
Hi,

I wasn't able to reproduce this behaviour, so can anyone send me an example for that bug?

Have more fun,
said Thomas