Report: Only Footer printed on the last Page

Hello fellow Navisionists, I have a Navision Attain 3.6 invoice report that really makes me mad. And I have a customer that really makes me mad. [:p] The Customer has about 500 perfectly printed Invoice Reports. But one of these 500 Reports prints an empty last page only containing the footer and nothing else. I tried everything to solve this problem. I even removed all the DataItems I dont need. So, the only DataItems left in this Report are Sales Invoice Header and Sales Invoice Line. But I still have this last page with the footer and without any Header. Ofcourse i set the Property “Print on every Page” and i use a Transheader. But no way. This report is driving me insane. What else can I do or am i facing another nasty navision bug? Thanks in advance! Greetings from Cologne Marc

…may be it has something to do with a bug that has been fixed with version 3.70, I can’t really tell if this was only related to 3.60 but from what you describe there can be a lot of reasons for this “last blank page”.


P60) Header Creates Blank Page Error When setting the property NewPagePerRecord = Yes, C/SIDE prints out an empty page at the end. This has been corrected Now the empty page is not printed. Service System reference: HQ-615-311-CPH5

Saludos Nils

Hi Marc, Activating “NewPagePerRecord” results in the Footer-section being printed on the last page. If you have inserted such a section. Maybe this little trick helps that is used to avoid empty pages in case you did not insert a Footer-section: Step 1 Set the property “NewPagePerRecord” to No Step 2 Insert a new Global called “NotTheFirst”, type Boolean Step 3 Insert some code in the OnPreSection-trigger of the Body-section: IF NOT NotTheFirst THEN NotTheFirst := TRUE ELSE CurrReport.NEWPAGE; Hope this will help you!

Hello Hans, thanks for your answer. But it didn’t work. I dropped a Request at the Navision Support last week. Hopefully they can give me a hint. Sometimes I hate these Navision Reports so much that I could spit on them. [}:)] At least it can’t get worse. [:D] Greetings from Cologne Marc

I used the suggestion of Hans and made a small adjustment for the report I was working on. This code works for me: OnPreSection() IF (CodLastContact <> '') AND (CodLastContact <> Contact."No.") THEN CurrReport.NEWPAGE; CodLastContact := Contact."No.";

Have you tried grouping by No. and set new page per group instead of new page per record?

I just had the same problem (empty last page) in our 2.60 database. It turned out that the combination of NewPagePerRecord=Yes and PrintOnEveryPage=Yes on a header (or footer) section triggers the bug. If PrintOnEveryPage=No, the empty page was not printed. Peter’s workaround did the job for me - thanks, Peter!

This isn’t actually a bug, since it is documented as a feature. [;)] Its been documented since version 2.01, before that it was a bug. [8D] basically if you use proerties, the system can not tell exactly how long the report will be till it is printed, so it is reserving the footer space just in case. by forcing code, you are telling the system when to go to the next page once you know if you need to or not. In 3.70 you can often allieviate this by setting dynamic properties in code rather than from properties.

When using the properties to generate the new page per record the system does several calculations to determine if this extra page will be created. Using the new page per record code instead an extra page can sometimes be created in error especially if the last page contains lines right down to the bottom of the page. There isn’t much you can do about this problem, but it’s something to be aware of.


Originally posted by ColRees
Have you tried grouping by No. and set new page per group instead of new page per record?

This suggestion is really neat, and I’m very grateful for it as it solved the bug (Navision bug [:(!]) just an hour or two before my report was due to be implemented. Thank you to Colin, and to Erik and the moderators for [:D] Alastair