Changing XML data source of Crystal Report

Wjqexwnllngbm

New Member
I created a Crystal Report and connected it to an XML file at \[code\]C:\SomeDir\Data.xml\[/code\].At runtime, I may need to put the data in \[code\]C:\SomeOtherDir\Data.xml\[/code\].The code I have so far looks like this:\[code\]ReportDocument report = new ReportDocument();report.Load("Report.rpt");PrinterSettings printerSettings = new PrinterSettings();PageSettings pageSettings = printerSettings.DefaultPageSettings;report.PrintToPrinter(printerSettings, pageSettings, false);\[/code\]That will print the report with the data at \[code\]C:\SomeDir\Data.xml\[/code\]. I want it to print the data at \[code\]C:\SomeOtherDir\Data.xml\[/code\].How can I do this?
 
Back
Top