Page 1 of 1

Send a parameter of a Field or Column from WINFORM

Posted: Tue Sep 22, 2020 11:12 am
by yalisalar
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.

Re: Send a parameter of a Field or Column from WINFORM

Posted: Tue Sep 22, 2020 11:14 am
by yalisalar
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;

Re: Send a parameter of a Field or Column from WINFORM

Posted: Tue Sep 22, 2020 11:20 am
by yalisalar
Image Report Design :
The attachment Report.jpg is no longer available

Image Report Form :
Image Report Design
Image Report Design
Report.jpg (272.34 KiB) Viewed 4687 times

Re: Send a parameter of a Field or Column from WINFORM

Posted: Tue Sep 22, 2020 11:22 am
by yalisalar
Image Report Form :
Image Report Form
Image Report Form
FORM.jpg (202.48 KiB) Viewed 4686 times

Re: Send a parameter of a Field or Column from WINFORM

Posted: Tue Sep 22, 2020 3:12 pm
by Lech Kulikowski
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.

Re: Send a parameter of a Field or Column from WINFORM

Posted: Wed Sep 23, 2020 11:31 am
by yalisalar
Hi

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

Posted: Wed Sep 23, 2020 11:36 am
by yalisalar
[ 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)

Re: Send a parameter of a Field or Column from WINFORM

Posted: Wed Sep 23, 2020 6:34 pm
by Lech Kulikowski
Hello,

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

Posted: Thu Sep 24, 2020 4:38 am
by yalisalar
Hello,

Thank you for your answer

Excuse me, but can you explain with an example? :D

Re: Send a parameter of a Field or Column from WINFORM

Posted: Thu Sep 24, 2020 9:48 am
by Lech Kulikowski
Hello,

Please send us your request on support@stimulsoft.com

Thank you.