I’m right now designing a complex report, and I need to print a Header on every page. The data-items are designed like this: Location >Sales header >>Sales line >>Materials >>Descriptions If I make a Header on “sales header” i get headers on every page, but way too many. If there are no details for “Location” I get a Header for every empty location. Because I need information in de Header coming from the “Sales header” I cannot use a Header on “Location”. So, I tried to make a Header on “Sales Line”. But, although the Property PrintOnEveryPage is YES, i do not get a Header on every page. When there is a pagebreak during processing “Materials” or “Descriptions” it won’t print the header. I could of course make transheaders for these items, but then this nice report designer decides to leave a lot blank space on several pages. I am really getting pissed by this report designer, how do I solute this without reading files twice, or entering too much stupid code? Please HELP!
I think you should use the Header on “sales header”. And in the OnPreSection-Trigger of this Header you should use CurrForm.SHOWOUTPUT(). means a condition which shows that the current record of table location is not empty. Then the Header should be suppressed if location is empty. I haven’t tried this, but hope that will help you! Frank
Sorry!!! I’ve made a mistake. What I mean is “CurrReport.ShOWOUTPUT(…)”, not CurrForm.SHOWOUTPUT(…) Frank
Thank you Frank, for your reply. I still have the same problem. The problem is not that location is empty, but that it has no details to print. There is no link between location and sales header, but with sales lines, for it is possible that there are different locations on the lines.
Kirsten Use a Record Variables OnAfterGetRecord Location Table Trigger to test if there are any child records if not then skip IE: HasChildren:=False; // Filter your Record Set SalesLine.RESET; SalesLine.SETRANGE(“Document Type”,“Document type”::Order); SalesLine.SETFILTER(“Location Code”,Code); HasChildren:=SalesLine.FIND(’-’); If NOT HasChildren THEN CurrReport.SKIP; Mr David Cox MindSource (UK) Limited Navision Solutions Partner Email: firstname.lastname@example.org Web: www.mindsource.co.uk
if i correct understand it are the printing = true if there is a Sales Header(because then there are Details) Yes!?, Maybe try this Location >SalesHeader >>Integer(Nummer=CONST(1)) >>>Sales Line >>>Materials >>>Description Print the Header on Integer, so there you know if there was an Sales Header or not! The Link between SalesHeader and Lines are still possible if you change the Properoty of SalesLine DataItemLinkReference. Maybe this help !?
Have u tried with the “Print only if detail” property?? (as i’ve seen on your scheme you can use it on sales header and location, so if it’s details (sales lines, materials… ) doesn’t containt data then you won’t print it’s headers…) Regards, Alfonso Pertierra email@example.com