I'm binding a Crystal Report Source to a SQLDataSource(SqlDataSource1) by a button click like;
DataView dvEnc = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
CrystalReportSource1ReportDocument.SetDataSource(dvEnc.Table);
From that poing no problem. The CrystalReportViewer show the report.
But before this operation The Crystal Report runs it's SQL queries and shows wrong data and this slows the pageload. I don't want this happen so I tried to set the datasource(empty one) of CrystalReportSource on Page Init like;
......Page_Init(..)
{
CrystalReportSource1.ReportDocument.SetDataSource(new DataTable("EmptyDataTable"));
}
so it's ok no data will be displayed but after I clicked the button, the code in button click work but the CrystalReportViewer don't show any data.
If necessary, I'm using Visual Studio.Net 2005, Asp.Net with C# and the Crystal Report that comes with
VS 2005.
Thanks,
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.