New field without changing the datasource
Hi,
I want to add a new field to my report without having to change the actual datasource in my application.
Why doesn't the following work:
Report report = new Report();
// register the business object
report.RegisterData(FBusinessObject, "Categories");
Column c = new Column();
c.Name = report.Dictionary.CreateUniqueName("TestFelt");
c.DataType = typeof(string);
c.Enabled = true;
report.GetDataSource("Categories").Columns.Add©;
Of course I could change my FBusinessObject directly, but I don't want that, because our users have the ability to create their own custom fields runtime.
Regards Jan
I want to add a new field to my report without having to change the actual datasource in my application.
Why doesn't the following work:
Report report = new Report();
// register the business object
report.RegisterData(FBusinessObject, "Categories");
Column c = new Column();
c.Name = report.Dictionary.CreateUniqueName("TestFelt");
c.DataType = typeof(string);
c.Enabled = true;
report.GetDataSource("Categories").Columns.Add©;
Of course I could change my FBusinessObject directly, but I don't want that, because our users have the ability to create their own custom fields runtime.
Regards Jan
Comments
It's impossible to add a new field to existing business object in this way. The only way is to add a new property to your business object, or create another business object which has all necessary properties.