Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

17.12 Manual DataSets with the IDE

Creating a DataSet Manually with the IDE

The previous method of building a dataset assumed that you have a table that can be dragged and dropped onto the designer. There are times you want to create a new table without having an existing data source. This could be a report based on user input or internal calculations. No worries, you can still use the IDE to create a dataset manually.

Just like before, add a DataSet object to your project. Right-click on the menu item Project > Add New Item. The Add New Item dialog box lists Dataset File as an option. Select this option, give it an appropriate filename and click Add.

The designer shows a blank screen. Right-click anywhere on the designer and select Add > DataTable. Right-click below the heading and select Add > Column. You can change the data type using the Properties window. In Figure 17-4 is a sample called DataTable1.





Figure 17-4. A new DataSet table.

After saving the file it can be referenced by a report.

If you make changes to the dataset schema after creating the report, the report will not recognize these changes. It keeps the schema in its cache and doesn’t refresh. The only way to force it to renew the cache is to completely close the Visual Studio IDE, re-open the project and select the menu options Crystal Reports > Database > Verify Database.