Problem in DataSet Registration
hello
Report report = new Report();
var dataSet1 = new DataSet1();
report.RegisterData(dataSet1, dataSet1.DataSetName);
but after these lines
when I Save Report
report.Save("");
no DataSource information (Tables , Relations) found in Dictionary Node.
thanks
Report report = new Report();
var dataSet1 = new DataSet1();
report.RegisterData(dataSet1, dataSet1.DataSetName);
but after these lines
when I Save Report
report.Save("");
no DataSource information (Tables , Relations) found in Dictionary Node.
thanks
Comments
FastReport does not save database items that are not enabled. When you call RegisterData method, all DataSet items are added into the dictionary, but they are all disabled. You have to enable necessary items via the "Report|Choose Report Data..." menu or programmatically. In the latter case, use the following code:
report.GetDataSource("table_name").Enabled = true;
it means that relations never appeared in the report files
I register All Tables of Dataset but no relation enabled in the report,
I have to go to the design mode and define their relations!
How do you register tables? If you call report.RegisterData for each DataTable in your DataSet, it won't register relations. To do this, register entire DataSet:
report.RegisterData(your_DataSet, "ds_name");
In this case, all DataTables and Relations will be registered.
the Relations are not available ,DataTables are not available too but by enableing them they are appeared in design mode but no relation found