I load an mdc file containing a report where, for each customer, are printed his accounting movements. Each customer movements may be on several pages.
The report is sorted for customer: when the customer changes, the page changes too.
Example:
--------------------
Page 1
...Customer code 1:
......Movement 1
......Movement 2
.........
......Movement 50
Page 2
...Customer code 1 (continued):
......Movement 51
......Movement 52
......- End of Customer 1 movements -
Page 3
...Customer code 2:
......Movement 1
......Movement 2
.........
......- End of Customer 2 movements -
--------------------
According to the example above, i would have to generate two pdf files: the first must be sent to the customer 1 (page 1-2), the second must be sent to the customer 2 (page 3).
Please note that, as said before, the report is loaded from an mdc file: the mdc file is generated by me, but i need to do the pdf generation not during the report generation but in a subsequent moment (that's why i load from an mdc file).
If anybody has some suggestion, maybe of great help for me.
My suggestion: loop through pages collection, read the "Customer code" in each page and determine the page range for each customer, then export to pdf for each page range. The problem is that i don't know how to read the customer code associated to each page, see the question embedded in this code:
Code: Select all
Dim page As Stimulsoft.Report.Components.StiPage
For Each page In rpt.RenderedPages
'Question: how do i get the "Customer code" associated to the page?
Next