Crystal Reports
-
Please tell me what I am doing wrong. I have some problems using Crystal Reports. I have for an example an Access database with a table called "Authors". I connect to the database using the server explorer in VS.NET 2005, I create an OleDbConnection and a DataAdapter. I use the Generate Dataset option from the DataAdapter to generate a Typed DataSet called dataSet1. I load data into the DataSet using the Fill method from the DataAdapter. Then I insert a new Crystal Report Document Using the Wizard and I add as data source From the Project Data/ADO.Net Datasets the dataset1.Authors. I add all the fields from the dataset and I add an Crystal Report Viewer control to the main form. I use the folowing code to set the ReportSource filed of the viewer: CrystalReport1 cs = new CrystalReport1(); this.crystalReportViewer1.ReportSource = cs; Ok, when I run the Application the Crystal Report Viewer it lists nothing from the DataSet data. What is wrong?
-
Please tell me what I am doing wrong. I have some problems using Crystal Reports. I have for an example an Access database with a table called "Authors". I connect to the database using the server explorer in VS.NET 2005, I create an OleDbConnection and a DataAdapter. I use the Generate Dataset option from the DataAdapter to generate a Typed DataSet called dataSet1. I load data into the DataSet using the Fill method from the DataAdapter. Then I insert a new Crystal Report Document Using the Wizard and I add as data source From the Project Data/ADO.Net Datasets the dataset1.Authors. I add all the fields from the dataset and I add an Crystal Report Viewer control to the main form. I use the folowing code to set the ReportSource filed of the viewer: CrystalReport1 cs = new CrystalReport1(); this.crystalReportViewer1.ReportSource = cs; Ok, when I run the Application the Crystal Report Viewer it lists nothing from the DataSet data. What is wrong?
-
Yay I found a solution just by adding one line of code to the code from above: CrystalReport2 cs = new CrystalReport2(); cs.SetDataSource(this.dataSet11); this.crystalReportViewer1.ReportSource = cs;
Thanks for this - much appreciated. :-D Wish I'd found it two days ago :mad:
Glen Harvy