Crystal Report Viewer进行页面回发更改 [英] Crystal Report Viewer doing Postback on page change

查看:64
本文介绍了Crystal Report Viewer进行页面回发更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们正在努力为我们的报告目的提供一些水晶报告.我们正在使用VS 2010,并且可用于VS 2010的附加Crystal Reports.

报告设计已完成,并且已检索数据.我们使用了插件随附的Crystal Report Viewer.

第一页显示准确,但是由于返回的数据量很大,因此报告会流入多个页面.

当我们尝试导航到下一页时,该页面回发,这迫使我们再次检索数据.我们试图将数据集绑定到ViewState只是为了使其更快,但是回发仍然很麻烦.

有什么方法可以避免查看器回发.

Hi,

We are trying to buld some crystal reports for our reporting purposes. We are using VS 2010, and the add-on Crystal Reports available for VS 2010.

The report design is complete and data is retrieved. We have used the Crystal Report Viewer which comes with the plug in.

The first page displays accurately, but since the amount of data returned is large, the report flows into multiple pages.

When we try to navigate to the next page, the page Posts back, and this forces us to retrieve the data again. We tried binding the dataset to a ViewState just to make it faster, but the postback is still disturbing.

Is there any way to avoid the viewer from Posting Back.

推荐答案

我不确定您如何加载Crystal Report查看器,但是我已经做了类似的事情,但是遇到了您提到的问题....

字符串lstrFileName = Server.MapPath("rptSalesOrder.rpt");
ReportDocument reportDocument = new ReportDocument();
reportDocument.Load(lstrFileName);
DataSourceConnections dataSourceConnections = reportDocument.DataSourceConnections;
IConnectionInfo connectInfo = dataSourceConnections [0];
connectInfo.SetConnection("BITS_01_07","MOBILE_TEST","sa",");
CrystalReportViewer1.ReportSource = reportDocument;
CrystalReportViewer1.RefreshReport();
I am not sure how you are loading your crystal report viewer but i have done something like this and not got the problem mentioned by you....

string lstrFileName = Server.MapPath("rptSalesOrder.rpt");
ReportDocument reportDocument = new ReportDocument();
reportDocument.Load(lstrFileName);
DataSourceConnections dataSourceConnections = reportDocument.DataSourceConnections;
IConnectionInfo connectInfo = dataSourceConnections[0];
connectInfo.SetConnection("BITS_01_07", "MOBILE_TEST", "sa", "");
CrystalReportViewer1.ReportSource = reportDocument;
CrystalReportViewer1.RefreshReport();


这篇关于Crystal Report Viewer进行页面回发更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆