Send a parameter of a Field or Column from WINFORM

Stimulsoft Ultimate discussion
Post Reply
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

Send a parameter of a Field or Column from WINFORM

Post 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.
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

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

Post 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;
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

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

Post 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 3552 times
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

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

Post by yalisalar »

Image Report Form :
Image Report Form
Image Report Form
FORM.jpg (202.48 KiB) Viewed 3551 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

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

Post 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.
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

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

Post by yalisalar »

Hi

OK! Thank you very much for your good answer.

The problem was solved! → By variables.
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

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

Post 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)
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

You can use expression from Text component instead of the Text.TextValue

Thank you.
yalisalar
Posts: 19
Joined: Tue Sep 22, 2020 4:51 am

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

Post by yalisalar »

Hello,

Thank you for your answer

Excuse me, but can you explain with an example? :D
Attachments
FACTOR000.mrt
(25.68 KiB) Downloaded 177 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

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

Post by Lech Kulikowski »

Hello,

Please send us your request on support@stimulsoft.com

Thank you.
Post Reply