- Create new website
- Add a dataset (Do not specify the connections)
- With the empty dataset open, goto the toolbar and double click on 'DataTable'
- Do not specify connections for the data table
- Click the header of the data table to give it a name (eg Employee Table)
- Right click the data table's 1st row, and select add/column
- Give your column a name (eg Column01)
- Save changes and close the dataset.
- From your site's root, Add new item
- Select crystal report
- Select "Project data sources"
- Select ".NET data sources"
- Select your previously created dataset
- Finish the resulting wizard
- On the report designer, select the columns 2b displayed on the report
- Now, from client code:
- Create a new instance of a dataset, and data-adapter
- Fill the datasest using sql statement which is executed by the data-adapter
- Create a new report document instance (from your exesiting crystal report)
- Set datasource of the report document, to the dataset
- Set report source for the crystaReportViewer, to the report document created
- You're done.
- Your report is ready to run (change the sql statement to display dynamic data)
About Me
Wednesday, September 16, 2009
Dynamic C# crystal reports
To create dynamic crystal reports, the following are the instructions:
Subscribe to:
Posts (Atom)