I wan’t to create DataSet from code and set it as data source for crystal report.
I don’t want to create a DataSet xsd file in VS if I don’t have to. Just pure code.
DataSet ds = new DataSet();
DataTable tbl = new DataTable();
DataColumn cln = new DataColumn();
// I fill row, columns, table and add it to ds object
...
Then when I need report I use:
myReport.SetDataSource(ds);
The problem here is I don’t know how to bind this to report? How to add fields?
I have a text and binary data (image).
There is only way out. As suggested by rosado. Little bit explained
1. CReate a RPT File.
2. Create a XSD with the desired columns.
3. Drag drop the columns on the rpt. Format it as required.
4. Now create connection, use adapter to fill that dataset.
5. Filling u dataset will automatically fill the report columns.
Below is a sample code from one of mine project.