I got a statement like this:
if (Sum(Data1,Total) == 0.00) {
this.Text271.Enabled = false;
this.Text272.Enabled = false;
this.Text273.Enabled = false;
}
This statement is use to hide 3 Sti Text if the total value of field "Total" reside in the "Data1" databand is 0.00.
However, an error was occured mentioned "Operator '==' cannot be applied to operands of type 'decimal' and 'double' "
Any idea to deal with it?
Sum Method
Re: Sum Method
Hello,
Please try to use the following code:
Thank you.
Please try to use the following code:
Code: Select all
if (Sum(Data1,Total) == 0) {
this.Text271.Enabled = false;
this.Text272.Enabled = false;
this.Text273.Enabled = false;
}
Re: Sum Method
Thanks for your reply. The aforementioned error does not occur, but it does not solve my problems too. This is what i want:
-------------------------------------------------------
Group Department A Header
-------------------------------------------------------
---------------------------------------------
DataBand1
---------------------------------------------
columnSalary1
columnSalary2
----------------------------------------------
--------------------------------------------------------
Group Department A Footer
TotalColumnSalary1
--------------------------------------------------------
**********Details of the column************
TotalColumnSalary1.Text = {Sum(DataBand1,DycolumnSalary1)}
TotalColumnSalary1.AfterPrint =
if (Sum(DataBand1,columnSalary1) == 0) {
this.TotalColumnSalary1.Enabled = false;
}
I try to execute the statement by insert it inside the AfterPrint properties of the TotalColumnSalary1, it does not work at all.
The TotalColumnSalary1 contains 0.00 value but does not hide as I expected from the statement.
Any idea with this?
-------------------------------------------------------
Group Department A Header
-------------------------------------------------------
---------------------------------------------
DataBand1
---------------------------------------------
columnSalary1
columnSalary2
----------------------------------------------
--------------------------------------------------------
Group Department A Footer
TotalColumnSalary1
--------------------------------------------------------
**********Details of the column************
TotalColumnSalary1.Text = {Sum(DataBand1,DycolumnSalary1)}
TotalColumnSalary1.AfterPrint =
if (Sum(DataBand1,columnSalary1) == 0) {
this.TotalColumnSalary1.Enabled = false;
}
I try to execute the statement by insert it inside the AfterPrint properties of the TotalColumnSalary1, it does not work at all.
The TotalColumnSalary1 contains 0.00 value but does not hide as I expected from the statement.
Any idea with this?
Re: Sum Method
Hello,
Can you please send us your report with test data for analysis.
Thank you.
Can you please send us your report with test data for analysis.
Thank you.