Hi,
I have developed my crystal report with asp.net and now I have issue with it's paging I mean I have query which is returning more than 1 lk , For this i searched many thing on google but could not get any solution. My code is as below...
ReportDocument rptMainDoc = new ReportDocument();
protected void Page_Load(object sender, EventArgs e)
{
DataTable dtMain = new DataTable();
dtMain.Clear();
SqlParameter[] sqlMainPara;
sqlMainPara = new SqlParameter[7];
sqlMainPara[0] = new SqlParameter("Id", 1);
string repName = string.Empty;
dtMain = DbFactory.GetDataByProcedure("GetData" sqlMainPara).Tables[0];
repName = "Paging Testing";
rptMainDoc.Load(Server.MapPath(@"~\Reports\RptFile\Paging.rpt"));
rptMainDoc.SetDataSource(dtMain);
CrystalReportViewer1.ReportSource = rptMainDoc;
CrystalReportViewer1.ReuseParameterValuesOnRefresh = false;
CrystalReportViewer1.EnableParameterPrompt = false;
CrystalReportViewer1.HasRefreshButton = false; // this is set to false because giving parameter missing error.
CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
}
Now If i use IspostBack() property then when i clicked on second page , I am not able to view any records on page , I can't use Session (as I read many blogs regarding that " i should store that data at some where on server" )but I am storing my session data on sql server so that option is not useful for me.
So Can you please tell me what should i do , when user click on second , or any other page then query should not fire again and again.....
Thanks in Advance.