Skip to main content



      Home
Home » Archived » BIRT » Total.sum question
Total.sum question [message #155519] Sun, 23 April 2006 12:25
Eclipse UserFriend
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
Previous Topic:minor bugs in birt-rcp-report-designer-2_1_0 -- 2.1RC0
Next Topic:Problem with Scripted Data Source
Goto Forum:
  


Current Time: Thu May 22 10:30:50 EDT 2025

Powered by FUDForum. Page generated in 0.07666 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top