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

Comments

  • edited 3:45PM
    Hello,

    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.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.