Page 1 of 1

Binding a form control to a variable

Posted: Wed Feb 08, 2012 3:18 pm
by jmiller
I was surprised I didn't find a topic on this already. What is the best way to bind a form control to a variable?
I create a variable in code using Dictionary.Variables.
I want the user to use the designer, create a form, and bind a control directly to this variable.
I am using RegData() to register my business data.
My business data is not created until the report is rendered (see my earlier time-intensive post).
I want my business data to use this variable as a filter.

Binding a form control to a variable

Posted: Thu Feb 09, 2012 7:59 am
by HighAley
Hello.
jmiller wrote:I was surprised I didn't find a topic on this already. What is the best way to bind a form control to a variable?
I create a variable in code using Dictionary.Variables.
I want the user to use the designer, create a form, and bind a control directly to this variable.
I am using RegData() to register my business data.
My business data is not created until the report is rendered (see my earlier time-intensive post).
I want my business data to use this variable as a filter.
You could use code like next:

Code: Select all

rep.Dictionary.Variables["Variable1"].ValueObject = dateTimePicker1.Value;
Thank you.