Add values from multiple text boxes

Stimulsoft Reports.NET discussion
jrSD
Posts: 23
Joined: Wed Jun 10, 2015 8:10 pm

Add values from multiple text boxes

Post by jrSD »

Is it possible to perform mathematics on text boxes from two different Databands / Group Footers? I need to add the values from two or more data bands to produce a 'grand total'. Any help would be much appreciated!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Add values from multiple text boxes

Post by Alex K. »

Hello,

Please try to use the Totals functions.
For example - Totals.Sum(DataBand, DataSource.Column)

Thank you.
jrSD
Posts: 23
Joined: Wed Jun 10, 2015 8:10 pm

Re: Add values from multiple text boxes

Post by jrSD »

I am still having difficulty with this report. I am trying to add the values being calculated in text boxes. For example, I need a text box that will calculate "TextSHEETsum" + "TextLUMBERsum" + "TextHWsum" + "TextGLASSsum" at the bottom of my report. (see attached)

Any help will be greatly appreciated.
Attachments
MATERIAL COST REPORT.mrt
(359.18 KiB) Downloaded 269 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Add values from multiple text boxes

Post by Alex K. »

Hello,

Can you please send us a test data for your report. We will try to find a solution for you.

Thank you.
jrSD
Posts: 23
Joined: Wed Jun 10, 2015 8:10 pm

Re: Add values from multiple text boxes

Post by jrSD »

Thank you!! See attached.
Attachments
RPT_issues.zip
(1.52 MiB) Downloaded 207 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Add values from multiple text boxes

Post by Alex K. »

Hello,

Please check the sent data. Some columns are empty.

Thank you.
Attachments
Capture.PNG
Capture.PNG (45.4 KiB) Viewed 5415 times
jrSD
Posts: 23
Joined: Wed Jun 10, 2015 8:10 pm

Re: Add values from multiple text boxes

Post by jrSD »

The missing data comes from the .mdb database. I presume it would need to be re-linked you your end. Irrespective, all i need is to have a textbox that evaluates two or more other text boxes and provide a sum. Example:

Text1 + Text2 = ??

1 + 2 = 3

TextSHEETsum + TextLUMBERsum = (Result in new textbox)

Is there a way to reference a Textbox which resides in the report and then return it's value?

Thanks
jrSD
Posts: 23
Joined: Wed Jun 10, 2015 8:10 pm

Re: Add values from multiple text boxes

Post by jrSD »

OK. Please see the attached report and data. I am need to get the calculated data in the red, yellow, orange and blue text boxes to sum and appear at the bottom of the report in the GREEN text box.

Thank you
Attachments
RPT_issues2.zip
(800.22 KiB) Downloaded 233 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Add values from multiple text boxes

Post by HighAley »

Hello.

It's not so easy to get data from text components. There are component on report template and on rendered report. Usually there are many instances of one component on the rendered report.
It's better to use the same expression. Or use variables to save data there.

Thank you.
jrSD
Posts: 23
Joined: Wed Jun 10, 2015 8:10 pm

Re: Add values from multiple text boxes

Post by jrSD »

Unfortunately, I do not know how to use variables in this manner.

In additions, when I try to sum multiple expressions from different DataBands, I get bizarre results. How would I sum the expressions:

{Sum (round(Parts.SqInch*(Parts.InvParts.Cost*Parts.InvParts.WASTE),2))}
from DataBandSHEET

and

{Sum (round(Parts.SqInch*(Parts.InvParts.Cost*Parts.InvParts.Waste),2))}
from DataBandSOLID
Post Reply