Variable Question

Stimulsoft Reports.NET discussion
Post Reply
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Variable Question

Post by EDV Gradl »

In my code I set several variables like this:

myreport["MyVar"] = true;

It is possible to determine is MyVar actually exists in the report?

Thanks!
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Variable Question

Post by Vital »

You can use following code:

Code: Select all

if (report.IsVariableExist("MyVar"))...
or

Code: Select all

if (report.Dictionary.Variables.IndexOf("MyVar") != -1)...
Thank you.
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Variable Question

Post by EDV Gradl »

Somehow the first version does work right. But only after compiling the report, when loading as a dll it works.

report.IsVariableExist("MyVar") is false and

report.Dictionary.Variables.IndexOf("MyVar") is 3

Seems to be a bug to me.

Thanks!

Marco
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Variable Question

Post by Vital »

Problem fixed. Thank you.
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Variable Question

Post by EDV Gradl »

Irgnore this one and look under topic Big Problems with report.show
Post Reply