C# Business Objects Demo
Hi,
I am evaluating FastReport and I want to use Business Objects as datasource for the reports.
So I looked at the DataFromBusinessObject demo which I opened in VS2005.
But when I run it and choose "Create new report", Fast Report comes up with a blanc report, but there is no
Business Object data to choose from. It doesn't appear on the data-tab.
Even if I choose "Run Existing Report" and then in the preview windows choose for "Edit Page", the data-tab still doesn't show the Business Object.
Is this normal behavior or is this feature not available in the Demo version of Fast Report??
Greetings,
Marco
I am evaluating FastReport and I want to use Business Objects as datasource for the reports.
So I looked at the DataFromBusinessObject demo which I opened in VS2005.
But when I run it and choose "Create new report", Fast Report comes up with a blanc report, but there is no
Business Object data to choose from. It doesn't appear on the data-tab.
Even if I choose "Run Existing Report" and then in the preview windows choose for "Edit Page", the data-tab still doesn't show the Business Object.
Is this normal behavior or is this feature not available in the Demo version of Fast Report??
Greetings,
Marco
Comments
This is normal behavior, you should select the data source(s) in the "Data|Choose Report Data..." menu.
Aaahhh, I see the Business Object now, that's great.
But, is there a way to do this from code??
Choosing the Report data I mean.
report.RegisterData(myData, "MyData");
report.GetDataSource("MyData").Enabled = true;
But how do I make all sub-objects appear??
I tried the colums collection, and that works fine for the products.
But I added a list of Calculation-classes to the Product class like this:
Class Categorie
{
}
Class Product
{ }
Class Calculation
{
}
This is the function to set all objects.enabled = true
private void enableAll(FastReport.Data.BusinessObjectDataSource dsb)
{
}
The function-call is like: enableAll(report.GetDataSource("MyData"));
When the enabledAll() is called for the second time, the dsb.columns.count is zero.
So how do I make all sub-objects appear??
report.RegisterData(myData, "MyData", 2);
report.GetDataSource("MyData").Enabled = true;
report.GetDataSource("MyData.NestedData").Enabled = true;