Click here to Skip to main content
16,021,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Comments
Kethu Sasikanth 12-Jan-12 11:40am    
Use IsPostBack and handle the postbacks appropriately.
arjun006 13-Jan-12 0:46am    
Kethu, I do not want crystal viewer to postback for every page change of the report. Cannot it load the entire report at one go.
axeemg 8-Apr-15 7:20am    
i am also getting same issue with my soltion. Arjun006 did you find any solution?

1 solution

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();
 
Share this answer
 
Comments
arjun006 17-Jan-12 6:06am    
@bond_cse05, the ony difference from your code to ours was the RefreshReport line. But however, once we added this, the report starts asking for Report Parameters during runtime.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900