Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

Subreport with a PageSetDesc shows all pages, then resets to 1 !

edited October 2003 in Subreports
Hello,

I have a report with a subreport in the 'title' section containing the
report title information,
a detail section (with loads of fields), (I'm aiming for one page per record
in our data table - it's a detail report)
then a subreport in the 'Footer' section of the main report - this holds
page footer information (it's so we can alter it on the fly from our app).

That footer subreport needs to show the page number, and the total pages. I
have used PageSetDesc and when I run the report I see the count going up 1
of 1, 1 of 2, 1 of 3 ...... 1 of 52, then - as the report finishes - it
changes to 1 of 1 ! Bummer.

I have tried setting the resetpageno to false (on the subreport), tried
creating a variable on the subreport and setting it (with the contents of
the pageno from the main report) - and I've not managed to stop it going
back to zero.

Any ideas please would be very gratefully received.

Rich :)

Comments

  • edited October 2003

    ResetPageNo for a suberport only applies to pbSection style subreports.

    The SystemVariable is not going to work because the subreport generates once
    for each report. The generation process is essentially like running a new
    report from beginning to end.

    Use a Variable (or Label) and in the OnCalcEvent code

    Value := 'Page ' + InttoStr(Report.MainReport.AbsolutePageNo);



    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2003
    Thanks for that, I'll have a go!
    Rich :)

This discussion has been closed.