Hi,
I have a report that i need a different header depending on the page no., but i can't use pageno because this needs to be done for every different record on the headers, for example an Invoice that uses 2 pages to show all the lines, I want a different header in each page. Using PAGENO would work if I only print 1 invoice, but not if I print 2 invoices...
How can I do this?
Many thanks!
0
Comments
Have you tried using a TransHeader? Maybe that could help :-k
Thanks for the idea though.
Then insert 2 headers that have the "print on every page" property set to true. Then in the OnPreSection (check trigger name) of each of those header sections check if the current page number matches what you want to show and hide or show the section with:
Just rough idea of something to try.
Epimatic Corp.
http://www.epimatic.com
That solution would work if PAGENO would be reseted every new document no., but that's not how Navision works...
Do you want to print Header Type 1 for the first page of every invoice, then Header Type 2 for each subsequent page of that inoice?
You can do this quite simply:
Have two header sections in your report
e.g. PageLoop, Header (1)
PageLoop, header (2)
Then control the visibility by placing this code OnPreSection() of PageLoop, Header(1):
And this code OnInPreSection of PageLopp, Header(2):
www.NextEqualZero.com
A technical eye on Dynamics NAV
However the PAGENO is not reset every new job no.... that's why I thought i didn't happen, but you are right, I've checked the Sales invoice, and in that case it is reset... do you know why it happens with one report and not the other? Is there any property to get this to work?
Thanks a lot
The PAGENO is normally handled automatically by the report engine itself.
Maybe you have some code in there which programatically handles page numbering? Is this a custom report or is it based on a standard NAV report?
www.NextEqualZero.com
A technical eye on Dynamics NAV
Job
Integer (for the header with Job data in everypage..)
Extended Line Text
Contact Budget
Job Budget
I need the job header in very page (different for pages >1), but it is not reset after every different job no...
Any idea?
Anycase, I solved the problem by reseting the PAGENO myself! (I think I should have thought of this before #-o #-o ).
Thanks all for your help!!