In Visual Studio 2010, I am dynamically populating a list of Crystal Reports based on an XML file that have the following settings:
<Report file="C:\reportname.rpt" text="Report Name"
imageURL="~/images/reporticon.png" />
In my ASPX page I have a CrystalReportsViewer like the following:
<CR:CrystalReportViewer ID="CrystalReportViewer" runat="server" AutoDataBind="true"
Width="800px" Height="600px" CssClass="reportViewer" HasCrystalLogo="False" />
When a user clicks on a report link (Comes from a TreeNode object), the crystal report viewer report is set like the following:
CrystalReportViewer.ReportSource = "C:\reportname.rpt";
In my actual RPT report files, I have connection strings saved in them so the Crystal Report Viewer does not prompt the user to enter a user name and password.
My question is to find out if it is possible to change the connection string that is saved in the report file? How can I set the connection string information when I load an RPT file into the Crystal Reports Viewer?
Thanks in advance for any help...