Page 1 of 1

How to find category and name of business object?

Posted: Mon Oct 01, 2012 12:23 pm
by tpontow
Hello,

is there a way to find out the category and name of a business object in designed report (.mrt file) after loading the report and before registering the business object in code? I don't like to use fix names in code when using RegBusinessObject(). I like to read the name of the business object from designed report and use that for registering the business object at runtime.

FYI: i use only one business object per report. If i need more i use subreports.

Thanks and kind regards
Thorsten Pontow

Re: How to find category and name of business object?

Posted: Mon Oct 01, 2012 12:56 pm
by tpontow
I found it out by myself. I just need to use

Code: Select all

StiBusinessObject bo = Dictionary.BusinessObjects[0];
RegBusinessObject(bo.Category, bo.Name, dataSelector);
Thanks
Thorsten Pontow

Re: How to find category and name of business object?

Posted: Mon Oct 01, 2012 8:18 pm
by Andrew
Hello,

Great!