ax 2012 R3 Print multiple sales invoices


When you select multiple sales invoices for printing, at what point the instances of the report are getting created?

In the other words, is all data provided by DP class first, and then the instances of the report are created, or is it per report - get data from DP, then create report, and the same multiple times?

The clean -up of DP tables is done at the end of all processing,i know that…

This will help me to solve the problem with showing tax value on multiple invoices. As i have it now, only the last printed invoice shows all tax amounts. But if i set the breakpoint ANYWHERE in the DP class, all printed invoices are showing tax amounts correctly. How is it possible? I have created a custom Temp table to handle sales tax amounts - there can be different taxes, so one total is not enough - , and it gets populated the same way as other temp tables in SalesInvoiceDP. so how comes it behaves differently? since the debugger is of no use to me, i use SQL to trace the data. I noticed that , for each new invoice, records in SalesInvoiceTmp (invoice details) are appended, and records in SalesTaxTmp are first deleted, then inserted to a table. Which leads me to believe that for every separate invoice, the data is collected and instance is created immediately, since i am able to see all invoice and tax details no matter that the Salestax temp table is refreshed with every new invoice - BUT ONLY WHEN THERE IS A BREAKPOINT!. When you just let it run, only the last printed invoice has all the Tax data.

It almost looks like with breakpoint, the instances are created and populated one by one, and without breakpoint - all togeather at the end of processing.

Why do the records in Salestax Temp table are getting deleted after each SalesInvoiceJournal pass, and SalesInvoiceTmp records are not? There is no hidden delete_from statement hidden in code somewhere, nor there is a new instance created for every journal…

Any ideas, please?