在 Visual Studio 2010 中,我根据具有以下设置的 XML 文件动态填充 Crystal Reports 列表:
<Report file="C:\reportname.rpt" text="Report Name"
imageURL="~/images/reporticon.png" />
在我的 ASPX 页面中,我有一个 CrystalReportsViewer,如下所示:
<CR:CrystalReportViewer ID="CrystalReportViewer" runat="server" AutoDataBind="true"
Width="800px" Height="600px" CssClass="reportViewer" HasCrystalLogo="False" />
当用户单击报表链接(来自 TreeNode 对象)时,水晶报表查看器报表设置如下:
CrystalReportViewer.ReportSource = "C:\reportname.rpt";
在我实际的 RPT 报告文件中,我保存了连接字符串,因此 Crystal Report Viewer 不会提示用户输入用户名和密码。
我的问题是找出是否可以更改保存在报告文件中的连接字符串?将 RPT 文件加载到 Crystal Reports 查看器中时,如何设置连接字符串信息?
在此先感谢您的帮助...