Send a parameter of a Field or Column from WINFORM
Send a parameter of a Field or Column from WINFORM
Hi
I sometimes want to report values via WINFORM. But unfortunately I do not succeed!
For example, I want to send Text10 - Text22 - Text32 values via WINFORM.
Text22 == OK
Text10 and Text32 === NO!
I draw your attention to images and codes.
Please help me to solve this problem.
I sometimes want to report values via WINFORM. But unfortunately I do not succeed!
For example, I want to send Text10 - Text22 - Text32 values via WINFORM.
Text22 == OK
Text10 and Text32 === NO!
I draw your attention to images and codes.
Please help me to solve this problem.
Re: Send a parameter of a Field or Column from WINFORM
The following codes are sent to the report by a button :
if (RadioButtonControl11.Checked==true)
Text10.Text="ITALY";
if (RadioButtonControl12.Checked==true)
Text10.Text="GERMANY";
if (RadioButtonControl13.Checked==true)
Text10.Text="SPAIN";
//--------------------
Text22.Text= TextBoxControl20.Text;
//--------------------
if (RadioButtonControl31.Checked==true)
Text32.Text=Person.Family;
if (RadioButtonControl32.Checked==true)
Text32.Text=Person.Age;
if (RadioButtonControl33.Checked==true)
Text32.Text=Person.City;
if (RadioButtonControl11.Checked==true)
Text10.Text="ITALY";
if (RadioButtonControl12.Checked==true)
Text10.Text="GERMANY";
if (RadioButtonControl13.Checked==true)
Text10.Text="SPAIN";
//--------------------
Text22.Text= TextBoxControl20.Text;
//--------------------
if (RadioButtonControl31.Checked==true)
Text32.Text=Person.Family;
if (RadioButtonControl32.Checked==true)
Text32.Text=Person.Age;
if (RadioButtonControl33.Checked==true)
Text32.Text=Person.City;
Re: Send a parameter of a Field or Column from WINFORM
Image Report Design :
Image Report Form :
Image Report Form :
Re: Send a parameter of a Field or Column from WINFORM
Image Report Form :
-
- Posts: 6252
- Joined: Tue Mar 20, 2018 5:34 am
Re: Send a parameter of a Field or Column from WINFORM
Hello,
During the report, rendering exists two instances of each component (minimum two instances). One instance - component in the report template. Second instance - component which created the rendered report. During the creation of the second instance, report engine calculates expressions and write it to the second instance. When you write code like this:
Text23.Text = "test";
you call instances from report template which does not contain calculated values from expressions.
You can:
1. Instead of "{Text1.TextValue}" expression using the same expression as in Text1.Text property, or
2. Use variables. In this case, you can calculate value in variable, and then use this variable in expressions.
Thank you.
During the report, rendering exists two instances of each component (minimum two instances). One instance - component in the report template. Second instance - component which created the rendered report. During the creation of the second instance, report engine calculates expressions and write it to the second instance. When you write code like this:
Text23.Text = "test";
you call instances from report template which does not contain calculated values from expressions.
You can:
1. Instead of "{Text1.TextValue}" expression using the same expression as in Text1.Text property, or
2. Use variables. In this case, you can calculate value in variable, and then use this variable in expressions.
Thank you.
Re: Send a parameter of a Field or Column from WINFORM
Hi
OK! Thank you very much for your good answer.
The problem was solved! → By variables.
OK! Thank you very much for your good answer.
The problem was solved! → By variables.
Re: Send a parameter of a Field or Column from WINFORM
[ 1. Instead of "{Text1.TextValue}" expression using the same expression as in Text1.Text property ]
But I'm curious to know more about this method.
Can you explain this method as well? (With a image example)
But I'm curious to know more about this method.
Can you explain this method as well? (With a image example)
-
- Posts: 6252
- Joined: Tue Mar 20, 2018 5:34 am
Re: Send a parameter of a Field or Column from WINFORM
Hello,
You can use expression from Text component instead of the Text.TextValue
Thank you.
You can use expression from Text component instead of the Text.TextValue
Thank you.
Re: Send a parameter of a Field or Column from WINFORM
Hello,
Thank you for your answer
Excuse me, but can you explain with an example?
Thank you for your answer
Excuse me, but can you explain with an example?
- Attachments
-
- FACTOR000.mrt
- (25.68 KiB) Downloaded 183 times
-
- Posts: 6252
- Joined: Tue Mar 20, 2018 5:34 am