Reputation: 1389
So I'm making a report that needs to be able to be faxed and have a cover sheet if needed. I've added a cover as the report header with a total page count. There's a page header that generates the [page n of m] but is prevented from showing on the report header using a "if (pageNumber=1) then true". Being that I don't want the [page n of m] to include the count for the cover sheet, decided to manually make a page n of m. When it prints on the page, the numbers are in a float format instead of int, how can I fix this. Here's the Crystal Syntax I'm using and output.
numbervar n := PageNumber - 1;
numbervar m := TotalPageCount -1;
stringvar page := "Page " + toText(int(n)) + " of " + toText(int(m));
page
output: "Page 1.00 of 3.00"
I initially tried doing a reset page count after the report header, but that made the [totalPageCount] on the cover sheet 1 instead of 4.
thanks for the help, David K.
Upvotes: 1
Views: 17994
Reputation: 1
you can use the "reset page number after" feature - from the section expert then reset after your group changes. just to make your life e.z :*
Upvotes: 0
Reputation: 6027
Any reason why you're not using the built in "reset page number after" feature- from the section expert?
Or just doing:
"Page " + toText(PageNumber - 1,0) + " of " + toText(TotalPageCount -1,0);
Upvotes: 2