Page 2 of 3
Re: adding two values from two textboxes
Posted: Thu Dec 29, 2022 6:26 pm
by ddsmith99301
How do I write this so it will work with c# script? It was written with vb as the scripting engine. When I try to use the & operator in place of the AND it fails. How can I write it so c# will understand it?
SumIf(DataBand1,QueryResults.Invoice_Transaction_Gross_Amount,QueryResults.Invoice_Transaction_Charge_Code_Description="Property & Casualty Premium"
AND QueryResults.Invoice_Production_Reporting_Date>=VI2
AND QueryResults.Invoice_Production_Reporting_Date<=VI3
)

- 2022-12-29_10-22-29.png (37.39 KiB) Viewed 3313 times
Re: adding two values from two textboxes
Posted: Fri Dec 30, 2022 8:01 am
by ulli82
Re: adding two values from two textboxes
Posted: Fri Dec 30, 2022 9:00 am
by Lech Kulikowski
Hello,
Please check what language you are using - VB or CSharp, and use correct operators.
Thank you.
Re: adding two values from two textboxes
Posted: Fri Dec 30, 2022 5:11 pm
by ddsmith99301
Thanks for your answers. I finally figured that out on my own.
Re: adding two values from two textboxes
Posted: Fri Dec 30, 2022 5:31 pm
by Lech Kulikowski
Hello,
You are welcome.
Re: adding two values from two textboxes
Posted: Fri Dec 30, 2022 7:27 pm
by ddsmith99301
I tried to mimic what you showed in your sample report, but now I am getting the following. What could possibly cause this?
I am using data from SQL Server. You are using xml. Could this be the problem?

- 2022-12-28_21-23-27.png (129.62 KiB) Viewed 3281 times
On the first page the VB2 variable in the textbox doesn't present the value returned from the expression. It just shows the value 0

- 2022-12-30_11-21-47.png (8.68 KiB) Viewed 3281 times
On the second page the returned value of the expression on the first page shows instead of what should be the returned value from the expression on the second
page.

- 2022-12-30_11-20-21.png (8.77 KiB) Viewed 3281 times
Re: adding two values from two textboxes
Posted: Sat Dec 31, 2022 10:09 am
by Lech Kulikowski
Hello,
Please send your report for analysis.
Thank you.
Re: adding two values from two textboxes
Posted: Mon Jan 02, 2023 6:23 am
by ddsmith99301
Here you go. Thank you!
Re: adding two values from two textboxes
Posted: Tue Jan 03, 2023 8:07 am
by Lech Kulikowski
Hello,
Please check that this component is higher in the Report tree.
Thank you.
Re: adding two values from two textboxes
Posted: Tue Jan 03, 2023 10:09 pm
by ddsmith99301