MyObject in StiReport

Stimulsoft Reports.WPF discussion
Post Reply
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

MyObject in StiReport

Post by LukasT »

Hello,
your product is wonderfull. But we have one problem which we need to solve to have successful implementation.
We need to pass in some reference to our instance of object and than call its functions directly in report. I have found solution only for calling static functions. Is here any solution for our needs, please?
Thanks a lot.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

MyObject in StiReport

Post by Jan »

Hello,

Yes you can do this. Please make following steps:

1. Add reference to your assembly (which contain required types);
2. Create new variable with type - object;
3. Before report rendering assign to this variable required object:

Code: Select all

report.Compile();
report.CompiledReport["MyVariable"] = myObject;
4. Call content of your object from expression:

Code: Select all

{((MyNameSpace.MyType)MyVariable).SomeProperty}
Thank you.
Post Reply