Page 1 of 1

Sum Method

Posted: Thu Dec 13, 2012 5:28 pm
by low1988
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?

Re: Sum Method

Posted: Fri Dec 14, 2012 6:11 am
by Alex K.
Hello,

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;
}
Thank you.

Re: Sum Method

Posted: Sun Dec 16, 2012 11:01 am
by low1988
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?

Re: Sum Method

Posted: Sun Dec 16, 2012 5:26 pm
by Alex K.
Hello,

Can you please send us your report with test data for analysis.

Thank you.