Page x of y

Whether you're using the Standard or Professional Edition of Quartam Reports, this is the place to ask general questions about using this industry-level reporting tool for LiveCode.
Posts: 87
Joined: Sun Jul 18, 2010 5:23 pm

Page x of y

Post by NingImport » Sun Jul 18, 2010 7:45 pm

Page x of y

Posted by Pete Whittet on March 19, 2010 at 10:01am

I couldn't find the "Enhancement suggestions" page, so apologies for posting here ...

It would be really nice to have a system variable containing the total number of pages, so that the footer can be set up to show "Page x of y". We already have the current page number ... any chance of this ?

Many thanks,



Reply by Jan Schenkel on March 20, 2010 at 3:11pm

Hi Pete,

This is one of those awkward limitations that I would really like to resolve, but is more complicated that it looks. The straightforward case is where such a text appears in the page header or footer. Assuming that these have a fixed height (which they do) then those are pretty straightforward to fill back later on, when the rest of the report is done.

A generic setting that allows you to tell when a certain text field should be populated (immediately/end of data group/end of page/end of report) would be ideal - but what when such an item appears outside of the header and footer bands, as part of an expression for a stretching text field? That could mean that the whole layout has to be redone, which theoretically might result in a different number of pages, and so on.

I have been considering adding 'AutoText' items that you can drop onto the layout but won't allow you to edit their expressions and will automagically stay on one line, expanding to fit their content. Page number and page count would greatly benefit from that approach. And then if I add 'Page X of Y' as such an item, to make sure everything fits visually, there will also have to be a mechanism for localization of that string.

So it is a bit of work, but at least not as much as a full rewrite of the lay-outing mechanism to cover keeping blocks of data together, offering widow-orphan control and other such headache-inducing thinking exercises. Still, not something that will happen in the 1.1.x cycle - but hopefully later this year.

Best regards,

Jan Schenkel
Quartam Reports & PDF Library for Revolution


Reply by Pete Whittet on March 21, 2010 at 10:44am

Hi Jan,

Thanks for your reply. I can see now that my request is much more complex than it looks at first sight, and I'm really pleased that you're considering a solution for later on.

All the best,

===== The above post was imported from the old forum hosted at =====