Report Life Cycle

Stimulsoft Reports.NET discussion
Post Reply
pvasek
Posts: 9
Joined: Tue Jul 03, 2012 6:27 am

Report Life Cycle

Post by pvasek »

Hi All,

is there any description of the report life cycle? Something like what asp.net has (http://msdn.microsoft.com/en-us/library/ms178472.aspx)

I am trying to figure out what I can do in the scripts.

What I have found already:
- set StiText.Text in BeginRender script just doesn't have any effect, no matter if it is report, page, text "begin render" event
- set StiTable.ColumnCount has effect if it is called in Report.BeginRender but not in the StiTable.BeginRender
- in the Report.BeginRender script the data are not loaded yet

Could someone clarify these observations or just give me a simple description of report life cycle?

Thank you

Pavel

Updated: BeforeRender => BeginRender
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Re: Report Life Cycle

Post by Ivan »

Hello,

Some principles of the functioning the StimulReport.Net.

1. Source code of the report is formed. Forming based on the grounds of meta description of the report
2. This source code is compiled in to assembly
3. Assembly is loaded in to memory
4. Create object of the report from loaded assemblies
5. Report is rendered
6. Report is showed
- set StiText.Text in BeginRender script just doesn't have any effect, no matter if it is report, page, text "begin render" event
In the report class all expressions are converted to methods, for example Text1__GetValue(), and further, these methods are invoked.
- set StiTable.ColumnCount has effect if it is called in Report.BeginRender but not in the StiTable.BeginRender
StiTable is a virtual component, before the report rendering it is converted into a set of bands / textboxes, so the ColumnCount property is not working.
- in the Report.BeginRender script the data are not loaded yet
Can you please send us a sample report with data or a simple test project, which reproduce the issue?

Thank you.
pvasek
Posts: 9
Joined: Tue Jul 03, 2012 6:27 am

Re: Report Life Cycle

Post by pvasek »

Hi Ivan,

thank you for your explanation. Now, I understand it better.

For the issue with "data are not loaded yet" I just found that it is enough to call method Dictionary.Synchronize(); to get data loaded in my Report "Begin Render" script.

Pavel
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Re: Report Life Cycle

Post by Ivan »

Hello,

Let us know if you need any additional help.

Thank you.
pvasek
Posts: 9
Joined: Tue Jul 03, 2012 6:27 am

Re: Report Life Cycle

Post by pvasek »

No, that is fine.

Now I am looking at way how to extend the report before the compilation starts. But if I found no way to do that I will open another topic.

Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report Life Cycle

Post by HighAley »

Hello.

You could get any report's component by calling GetComponentByName() method.

Thank you.
Post Reply