水晶报表导出数据问题

Lion_wen666 2008-11-26 10:58:09
当我动态加裁另一个rpt数据源时,点导出依然是页面最早的rpt,请问为什么?
<asp:DropDownList ID="dropOperatorId" runat="server" AutoPostBack="True" OnSelectedIndexChanged="dropOperatorId_SelectedIndexChanged"></asp:DropDownList></div>
<div>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True"
ReportSourceID="CrystalReportSource1"/>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:shopConnectionString %>"
SelectCommand="SELECT * FROM [GuestInfo]"></asp:SqlDataSource>
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="E:\MyWeb\Other\CrmSystem\SystemSetup\Report\CustomerCyl.rpt">
</Report>
</CR:CrystalReportSource>
...全文
95 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Lion_wen666 2008-11-27
  • 打赏
  • 举报
回复
不行.一样是之前的.仍然是CustomerCyl.rpt
阿泰 2008-11-26
  • 打赏
  • 举报
回复
加载完数据后,要重新绑定下,建议贴出代码段看一下
阿泰 2008-11-26
  • 打赏
  • 举报
回复
myReport.Load(reportPath);
后面加上一句
CrystalReportViewer1.ReportSource=myReport;
然后再导看
lgcandywen8888 2008-11-26
  • 打赏
  • 举报
回复
ReportDocument myReport = new ReportDocument();
string reportPath = Server.MapPath("/CrmSystem/SystemSetup/Report/CustomerCy2.rpt");
myReport.Load(reportPath);
点水晶报工具栏的导出按钮就自动加裁CustomerCyl.rpt这个了,页不是CustomerCy2.rpt

4,818

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧