I am using RadRichTextBox in my project as a reporting tool. I have created a basic structure of application and it seems to be working fine. I am setting MailMergeDataSource to a collection to generate report of more than one selected records. For example If a user selects 10 records, 10 pages will be created in final report. (assuming 1 page per report). User can now edit the generated report (like formatting, refining and so on). Till this point it seems to be achievable. I further want to get all these 10 updated pages of reports separately (with the changes done on the view), I am not sure how to do it.
Following is the line I am using for MailMerge
radRichTextBox.Document = radRichTextBox.MailMerge(); //Start each record on new page.
I am not sure how to get the boundaries of each report. because if I use the API to regenerate each report the changes done on the print preview will be lost.
This is what I am talking about
IDocumentFormatProvider formatProvider = DocumentFormatProvidersManager.GetProviderByExtension(".docx");
for (int i=0;i<number_of_records; i++)
var doc = this.radRichTextBox.MailMergeCurrentRecord(); // returns a RadDocument that is the result of substituting the merge fields with the data from the current record.
byte binnaryReportData = formatProvider.Export(doc); //but changes will be lost
How can I achieve this?