Report variables not accessible - workaround.

Stimulsoft Reports.NET discussion
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Report variables not accessible - workaround.

Post by Brendan »


Hi Mark,
This is probably of no benefit but this is a sample of what I do.

Sample Download

Maybe there is a difference in versions that we use
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Report variables not accessible - workaround.

Post by Vital »

At this moment when you assign report to PreviewControl.Report report engine assign final report (if CompiledReport is not equal null).
So you lost link to parent report which contain report variables. In next build we correct this behavior. You can get link to parent report
in property ParentReport of compiled report, BUT this property is cleared after report rendering is finished. We have added new static property
to StiOptions - StiOptions.Engine.NotClearParentReport. This property block clearing of parent report. With using of this property you can get
use link to parent report:

report.ParentReport.Dictionary.Variables

Thank you.
Mark Smith
Posts: 37
Joined: Tue Jun 13, 2006 8:59 am
Location: Yorkshire, UK

Report variables not accessible - workaround.

Post by Mark Smith »

Vital -

Many thanks. I'll look forward to the next build.
Mark Smith
Posts: 37
Joined: Tue Jun 13, 2006 8:59 am
Location: Yorkshire, UK

Report variables not accessible - workaround.

Post by Mark Smith »

Brendan wrote: Hi Mark,
This is probably of no benefit but this is a sample of what I do.

Sample Download

Maybe there is a difference in versions that we use
Brendan -

Many thanks for that - I believe that your menuItem2_Click handler demonstrates exactly what I expected to happen. Anyhow, it looks like Vital is on the case so I'm happy - the workaround will only make it into a beta release of my app. :-0
Post Reply