I have a report that starts numbering over again at 1 on the highest break level. They also want a running page number that counts all. I have tried setting a variable, then putting code in the enter header to increment it, but that doesn't work, I've tried several other things, but havn't found a way that works yet. Has anybody had to do this?
I am assuming that you are using the Report designers Data Grouping. Try this. Make a report variable (lets call it 'lnPage') that stores the variable _pageno and resets when the data grouping changes. Next make a report variable (let's call it 'lnTotalPages') that SUMS this Expression "IIF(lnPage=_pageno,0,1)". Make sure 'lnTotalPages' is ABOVE 'lnPage' in the Variables list. Since '_pageno' gets incremented before variables are evaluated, 'lnPage' will have the previous page number. And since Variables are evaluated in the order they are listed, lnTotalPages will Always increment by one. Let me know if you have any problems..Thanks
P.S. If you are using 'lnPages' and 'lnTotalPages' in the Page Header, set the Initial Value of 'lnTotalPages' to 1 and 'lnPages' to 0. If you are using 'lnPages' and 'lnTotalPages' in the Page Footer, Set the Initial Value of 'lnTotals' to 0 and 'lnPages' to 0.
Good Luck!
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement