cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a group value programming after crystal report loaded

Former Member
0 Kudos

Dear Expert,

Here's the scenario: We need to send invoices to customer in batch. The crystal report shows multiple invoices (let's say 100 invoices, 150 pages total) in preview, after preview it will send to different customers. One invoice in one PDF file, could be more than one page depends on how many items the invoice has. So now the issue is how to split by invoice number?

The report was grouped by invoice number. My idea is if there's a way to loop through whole report (150 pages), on each page, check invoice number, if same then keep in same export to PDF. Something like below:

Foreach (page in reportDocument.Pages){

if (page.invoiceNumber == previousNumber) {

'do something

}

}

Once page range identified, I can export by page range. I've googled, read SDK and also searched in this community, but could not find any way to loop through a report document. The in pro RAS SDK sample code mainly focus on report definition manipulation.

Is there a way to loop through a loaded report? or other way to achieve this?

Thank you for your help!

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Stone,

You can use the SavedDataRecordSelection formula to add more filtering.

Or this one: crystalReportViewer1.ViewTimeSelectionFormula

I had a sample on how to add more filtering using parameters but I can't find it now... I'll keep looking.

Work flow is to export the report to RPT format so it has saved data and then preview that and add filtering, export to new report and then do it again for each....

Don

Answers (1)

Answers (1)

ido_millet
Active Contributor
0 Kudos

Several of the 3rd-party Crystal Reports desktop schedulers listed here: http://kenhamady.com/productlinks/default.html#desktopsched provide report bursting functionality.

Former Member
0 Kudos

Thanks for the information. 3rd-party scheduler was not a option in this case. If it's a library can include in our project maybe ok.