Problem displaying Dataset data in Crystal Report
Hi, I am using VS 2005. I created a Dataset, with one table. Very basic. I view data and it shows me two rows of data. I then go to my form which has a crystal report viewer, I click to create new crystal report. I then go through the wizard and link it to my dataset, add 1 field and then build my project. But there is no data in my report. What could cause this? I see data in my dataset and just do the most basic crystal report you can.
Re: Problem displaying Dataset data in Crystal Report
Quote:
But there is no data in my report. What could cause this? I see data in my dataset and just do the most basic crystal report you can.
Are you passing the query in the crystal report crviewer also??
Re: Problem displaying Dataset data in Crystal Report
Whenever I use DataSets (or business objects) for reports, I populate the data first and then pass it to the report. e.g.
Code:
// Create an instance of the report, and supply the data source.
// QuickQuoteReport is a CR ReportClass.
QuickQuoteReport report = new QuickQuoteReport();
MyDataSet ds = Database.GetSomeData();
report.SetDataSource(ds);
HTH,
Buoy
Re: Problem displaying Dataset data in Crystal Report
Buoy,
Is that a dataset that you are creating at runtime? If so, I can do that fine but I was trying to use the wizard to create a dataset and then have the report look to it for it's data.
Re: Problem displaying Dataset data in Crystal Report
Yes, the instance of that DataSet would be created at runtime and then passed to the report. The report is designed using the wizard and the same type of DataSet.