Hi all,
In NAV2009, I added a Boolean value "PrintDetail" to the Sales Invoice report 10074. This flag suppresses printing of detail lines on the invoice (We have summary lines and detail lines - think Kits) when not checked.
The variable is always initialized to FALSE, so the user must check the box every time they want to see detail - this is what we want and this works when printing the invoice from the Posted Invoice page.
However, here is a scenario:
1. User prints an invoice and checks the box.
2. User then goes to UNPOSTED invoices and selects "Post + Print" for an invoice. Remember that the invoice prints without displaying the Request Page
The Invoice report "remembers" that the last time this user printed the report, he had checked the box. Even though the Report's OnInit trigger resets it.
I've inserted CONFIRM statements to check. The "PrintDetail" flag is being reset to FALSE when the report is run. But when it gets to the first DataItem, a second CONFIRM shows that the value has been changed back to TRUE.
Has anyone encountered this issue? Workaround? The report is run via the standard Codeunit 82 (Sales Post + Print) which calls the report via:
REPORT.RUN(ReportSelection."Report ID",FALSE,FALSE,SalesInvHeader);
So I can't call a function inside the report to reset the variable.
Any ideas would be appreciated.
Comments
Thank you for reminding me of this property - I didn't recall that the standard invoice report has this property set to "yes"