Hi! I created report and RDLC layout. In the next step I want to print reports for more than one record at the same time (like Purchase Invoice printing with filtr on a few documents - for every document - new page occurs report).
How can I do this? I want the same behaviour - for every record - new page in printed report.
I pass on table records to report X and it works correctly - 'OnAfterGetRecord' for dataitem occurs X times. But report is printed only for first record.
Hi, I think you can refer to the standard report.
for example, Standard Sales - Order Conf. (1305)
Source Code and layout file:
[View:/cfs-file/__key/communityserver-discussions-components-files/758/StandardSalesOrderConf.Report.al]
[View:/cfs-file/__key/communityserver-discussions-components-files/758/StandardSalesOrderConf.docx]
[View:/cfs-file/__key/communityserver-discussions-components-files/758/StandardSalesOrderConf.rdlc]
Hope this helps.
Thanks.
ZHU
That really depends on how your report is built.
Often when you want to print many records with a page shift in between you really want to process it as separate report executions.
That is what the use of a repeat loop will do for you.
A good example is an invoice or an order confirmation. You should loop through those document headers and print them one by one. Instead of getting a multi page report.
Can you expand your answer?
Where is needed to loop through records? If table with many records is passed to report (and trigger many times dataitem in OnAfterGetRecord trigger) - it is not this looping?
You need to loop through the records and put your report processing into a repeat statement.
Read more about the repeat statement here:
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156