How to initialize a variable from a form field

Stimulsoft Reports.WPF discussion
Post Reply
pflores
Posts: 8
Joined: Fri Oct 14, 2016 12:14 pm

How to initialize a variable from a form field

Post by pflores »

Hello,

I declared a variable in my report, and I have a form that shows up before the report is rendered.

I'd like the variable to be set to the value the user wrote in my form.
I tried to init the variable with the expression "myFormField.Text" but it gives me an error.

Is there a way to do what I want?
Thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to initialize a variable from a form field

Post by Alex K. »

Hello,

Could you explain your issue in more details?
Also, please send us a simple report which reproduces the issue for analysis.

Thank you.
pflores
Posts: 8
Joined: Fri Oct 14, 2016 12:14 pm

Re: How to initialize a variable from a form field

Post by pflores »

I upload an example report.

I try to set a variable "myVariable" to the value of the name field in the form, but i get an error (that I cannot display) in the preview.
Attachments
ReportArgumentsSql.mrt
(27.53 KiB) Downloaded 256 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to initialize a variable from a form field

Post by Alex K. »

Hello,

In this case, try to set the ReadOnly property for the variable.

Thank you.
Post Reply