Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Still Struggling & Need Assistance
Message
General information
Forum:
ASP.NET
Category:
Reporting
Miscellaneous
Thread ID:
01504280
Message ID:
01504297
Views:
52
Now you lost me.

In the Crystal Database Expert I connected to SQL and selected the stored procedure and brought the SP into the report. I then dragged fields from the Field Explorer into the report. There was no DataSet involved. I have always done it this way.

Also, reportObj.SetDataSource expects a DataSet, not a string, so how does the table name come into play?




>1st: What was the name of the dataset and datatable you used when you created the report? Make sure the datatable name matches in your dynamic datatables created when running via code. don't pass table[0], pass the datatable name like my_datatable or my_dt (whatever it was when you created the report (always in design mode save your datatable with a name that you can pass later - the datasource in runtime mode can then be almost any datasource with a source name and contains column names and types that match.)
>
>2nd: Check and see if there is any data (still should not produce the error you see though)
>
>
>            if (dsProjectInfo.Tables[0].Rows.Count == 0)
>            {
>                MessageBox.Show("No data Found", "CrystalReportMissingData");
>                return;
>            }
>
>
>
>Just to be clear: reportObj.SetDataSource(dsProjectInfo.Tables[0]) cannot work.
>
>reportObj.SetDataSource(dsProjectInfo.MyDataTable) would work if when you designed the crystal report you used a datatable named "MyDataTable" as the datasource in design mode.
>
>In design mode, what was the name of the dataset and datatable you used? Just make sure the names match in code (and the result columns match as well) . The datatable's name must match that in the schema file used by the report.
>
>It's been a couple of years since I've worked with Crystal Reports in .net, but I'm pretty sure those rules haven't changed...
>
>When you create a dataset and datatable(s) in the designer, save the datatable with a name that makes sense to you according to the report and the data you are using. Then use the same name when you create the datatable in code programmatically and pass it with that name in code.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform