Add values from multiple text boxes

Stimulsoft Reports.NET discussion
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.

Sorry, there is no Inventory2000Data.mdb so we can't render your report. But we will try to guess.

Please, try to create a variables (TotalSum) and use next expression:

Code: Select all

{TotalSum += Sum (round(Parts.SqInch*(Parts.InvParts.Cost*Parts.InvParts.WASTE),2))}
After this you should show the value of the TotalSum variable.

If you still need our help, please, send us all necessary data for your report template.

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

Re: Add values from multiple text boxes

Post by jrSD »

AAACCCKKKKKk!! I still am not getting it. The first attachment I posted in the thread has the mdb database included in the compressed file. I am submitting it again.
"TotalSum" would be the name of the variable. I get that, and if I make the value a hard number, the variable worked correctly, though when I add the code:
{TotalSum += Sum (round(Parts.SqInch*(Parts.InvParts.Cost*Parts.InvParts.WASTE),2))}
as the value or expression, I come up with errors.

I will be so grateful for additional help.
Attachments
RPT_issues.zip
(1.52 MiB) Downloaded 158 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 modified report in the attachment.

Thank you.
Attachments
Capture.PNG
Capture.PNG (74.21 KiB) Viewed 3073 times
MATERIAL COST REPORT_modified.mrt
(365.86 KiB) Downloaded 307 times
jrSD
Posts: 23
Joined: Wed Jun 10, 2015 8:10 pm

Re: Add values from multiple text boxes

Post by jrSD »

THANK YOU VERY MUCH!!!!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Add values from multiple text boxes

Post by Alex K. »

Hello

We are always glad to help you!
Let us know if you need any additional help.

Thank you.
shiva
Posts: 4
Joined: Mon Jul 08, 2019 8:58 pm

Re: Add values from multiple text boxes

Post by shiva »

Can you please explain how you did it, I am struggling to do the following.
I have calculated a summary value in a footer band for a group based on a condition of a column value, I want to use this value further in the same band and add and subtract values calculated in other fields. Is it possible?
Lech Kulikowski
Posts: 6243
Joined: Tue Mar 20, 2018 5:34 am

Re: Add values from multiple text boxes

Post by Lech Kulikowski »

Hello,

You can use variables for calculations and then use it in necessary expressions.

Thank you.
shiva
Posts: 4
Joined: Mon Jul 08, 2019 8:58 pm

Re: Add values from multiple text boxes

Post by shiva »

Can you give a simple example where a variable stores the summary value with if condition and is stored in a variable, it gives me some error to parse. Can I use a simple + or - to add and subtract this derived value to another column using the variable. A screenshot will be helpful.
Thanks,
shiva
Posts: 4
Joined: Mon Jul 08, 2019 8:58 pm

Re: Add values from multiple text boxes

Post by shiva »

To elaborate further I put this in the variable
SumIf (Datasetname.column name, Datasetname.columnname1 == true) +Datasetname.columnname3...how do I refer to name of the databand, it gives me errors like not accepting the number of arguments etc. please advise.
Lech Kulikowski
Posts: 6243
Joined: Tue Mar 20, 2018 5:34 am

Re: Add values from multiple text boxes

Post by Lech Kulikowski »

Hello,

You should use the data source name or use the following expression in the text expression:

If the issue still present, please send us a sample report with test data which reproduces the issue for analysis.

Thank you.
Post Reply