I've got 2 applications:
- 1. App to prepare data for reporting - C# (.Net 1.1)
- 2. App to display report - C++ (maybe)
First app send parameters such a report file name, report parameters to second app via command line. Then second app display prepared report.
Now I want to change some report fields. My code in 1st app:
ReportDocument rDoc = new ReportDocument();
rDoc.Load(@"D:\reports\report_1.rpt");
rDoc.Database.Tables[0].Location = "newDBName.schema.oldTableName";
rDoc.SaveAs(@"D:\reports\report_1_modif.rpt",ReportFileFormat.VSNetFileFormat);
I want to modify rpt file because I want to take data from the archive database. "CrystalDecisions.CrystalReports.Engine" reference version is 9.1.5000.0. So 2nd app can't use modified rpt file because of incompatible versions. 2nd app can work only with 8.5 file formats.
When I open rpt file in CR Developer I can manually change location and save in 8.5 file format. In this case 2nd program normally works with modified file.
So my question is: "How can I in .Net C# open rpt file 8.5, modify and save in 8.5 format with another name?". Maybe I should use some unmanaged code?
Crystal Reports 8.5 was released in 2001. .Net in 2002.