How to find category and name of business object?

Stimulsoft Ultimate discussion
Post Reply
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

How to find category and name of business object?

Post 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
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

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

Post 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
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

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

Post by Andrew »

Hello,

Great!
Post Reply