troubleshooting Question

Connect Crystal Report to a DataSource

Avatar of Umut Şeker
Umut ŞekerFlag for Turkey asked on
.NET ProgrammingCrystal ReportsASP.NET
7 Comments1 Solution6606 ViewsLast Modified:
I'm binding a Crystal Report Source to a SQLDataSource(SqlDataSource1) by a button click like;

    DataView dvEnc = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);

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;
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.
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros