adding two values from two textboxes
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
adding two values from two textboxes
I have two textboxes on the report. I would like to add the two numbers and put the total in a third textbox. How do I do it?
Re: adding two values from two textboxes
Hello,
You can use expressions from first and second text component in the third textbox:
{Text1expression + Text2expression}
Thank you.
You can use expressions from first and second text component in the third textbox:
{Text1expression + Text2expression}
Thank you.
Re: adding two values from two textboxes
To understand better is the above solution valid even if the expressions which are being added are like sumif{} derived by using summary.
-
- Posts: 6259
- Joined: Tue Mar 20, 2018 5:34 am
Re: adding two values from two textboxes
Hello,
You can use an additional variables in text expression where sumif are used:
{Variable1 = SumIf()} {Variable2 = SumIf()}
and then use
{Variable1 + Variable2}
Thank you.
You can use an additional variables in text expression where sumif are used:
{Variable1 = SumIf()} {Variable2 = SumIf()}
and then use
{Variable1 + Variable2}
Thank you.
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: adding two values from two textboxes
Lech, please give an example of where to set the two variables and when to use them. I have a group band and a databand. I put textboxes in the group band with expressions that use Sumif. I would like to use the two variables added to gather to put in the third textbox.
-
- Posts: 6259
- Joined: Tue Mar 20, 2018 5:34 am
Re: adding two values from two textboxes
Hello,
Please check the sample report.
Thank you.
Please check the sample report.
Thank you.
- Attachments
-
- ReportSample.mrt
- (793.61 KiB) Downloaded 80 times
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: adding two values from two textboxes
I tried everything to get this to work. I can't figure out what I am doing wrong. Why is the text box output 'False' where I am trying to set the VB2 variable?
Here is the designer.
Here is the output.
Here is the designer.
Here is the output.
-
- Posts: 6259
- Joined: Tue Mar 20, 2018 5:34 am
Re: adding two values from two textboxes
Hello,
What script language is used for the report? Please try to set it to CSharp.
Thank you.
What script language is used for the report? Please try to set it to CSharp.
Thank you.
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: adding two values from two textboxes
I found the option to change to c# script. That seemed to have worked. So, my conclusion is the vb scripting doesn't work. I am using ver 2019.3.1. Has that been fixed in later versions?
-
- Posts: 52
- Joined: Wed May 17, 2017 10:14 pm
Re: adding two values from two textboxes
I said before that it worked but there is a cost. Now I have 300+ errors!