I’m generating a Crystal Reports report which will ultimately need to be split into thousands of pdf files. What would be ideal would be if Crystal Reports had something like a “file break”, like a page break, that you could insert into the file at the appropriate places.
I will need reasonably fine control over the file names, as well….something like “fileName_{CustomerId}_{CustomerIsLocal}.pdf”.
I’m presuming a third-party piece of software will probably be needed. Thoughts?
TIA.
I wanted to document this for anyone else who shows up looking for the answer:
References:
CrystalDecisions.CrystalReports.Design
CrystalDecisions.CrystalReports.Engine
This code yields a filename like so:
“EndOfYear_123456_1.pdf”
It is certainly possible to generate the report object for each row, rather than passing it in, but slows things down quite a bit. Reusing the same report object doesn’t have any negative impact as far as I could see, and made things go about ten times faster.
The only other thing you need is how to prepare a Crystal report, which is beyond the scope of this tutorial. Good luck!