Total.sum question [message #155519] |
Sun, 23 April 2006 12:25 |
Eclipse User |
|
|
|
Hi All,
I have a datasource table:
Date,Amount,Currency
Aug,100,EUR
Aug,-100,EUR
Aug,-200,USD
Sep,-50,EUR
Sep,-150,USD
Oct,100,EUR
Oct,150,USD
And a radio parameter with three available values: All/In/Out and a
table with three columns 1. Date(group) 2. EUR 3. USD
2. column:
result = Total.Sum(row["Amount"], row["Currency"]=="EUR")
resultIn = Total.Sum(row["Amount"], row["Currency"]=="EUR" &&
row["Amount"] >0)
resultOut = Total.Sum(row["Amount"], row["Currency"]=="EUR" &&
row["Amount"] <0)
if (params["NewParameter"] == "All")
result
if (params["NewParameter"] == "In")
resultIn
if (params["NewParameter"] == "Out")
resultOut
3. column
result = Total.Sum(row["Amount"], row["Currency"]=="USD")
resultIn = Total.Sum(row["Amount"], row["Currency"]=="USD" &&
row["Amount"] >0)
resultOut = Total.Sum(row["Amount"], row["Currency"]=="USD" &&
row["Amount"] <0)
if (params["NewParameter"] == "All")
result
if (params["NewParameter"] == "In")
resultIn
if (params["NewParameter"] == "Out")
resultOut
My problem is if I chose the In or Out value of parameter two columns
numbers are the same. Can anyone know what is the problem with my
expressions? (or is it a bug?)
thx in advance
-farkas
|
|
|
Powered by
FUDForum. Page generated in 0.07666 seconds