Skip to main content



      Home
Home » Archived » BIRT » Summing up Data field values
Summing up Data field values [message #149402] Thu, 30 March 2006 09:09 Go to next message
Eclipse UserFriend
Originally posted by: cbredesen.comerxia.com

All,

I'm new to BIRT and finding the report designer quite nice, and have had
relatively little trouble constructing my report and using queries to
populate the data. I'm creating a standard Income Statement that pulls
bottom-line data from at least three separate SQL queries. By bottom-line,
I mean that I'm letting the database give me the line items in total, not
having BIRT sum up large amounts of data.

What I'm up against is that I can't seem to get a total on the bottom of the
report. Using Total.sum() expects a row or some other expression that I'm
unable to figure out. What I kinda want is the ability to blindly sum up a
"virtual" column without caring where the data came from. I'll try to
exemplify this:

Query1.col1 $5
Query1.col2 $5
Query1.col3 $5
Query2.col1 $3
Query3.col1 $3
Total ????

I'm using a Grid to layout a 2-column arrangement for this and the actual
values in the right column are Data objects. Notice that multiple data
sources and columns are used. I can't just some up some single column from
a single data source. I need to sum up the Grid's second column.

Can anyone help?

Thanks in Advance,

Chris
Re: Summing up Data field values [message #149408 is a reply to message #149402] Thu, 30 March 2006 09:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.budner.abg.com.pl

Chris Bredesen napisał(a):
> All,
>
> I'm new to BIRT and finding the report designer quite nice, and have had
> relatively little trouble constructing my report and using queries to
> populate the data. I'm creating a standard Income Statement that pulls
> bottom-line data from at least three separate SQL queries. By bottom-line,
> I mean that I'm letting the database give me the line items in total, not
> having BIRT sum up large amounts of data.
>
> What I'm up against is that I can't seem to get a total on the bottom of the
> report. Using Total.sum() expects a row or some other expression that I'm
> unable to figure out. What I kinda want is the ability to blindly sum up a
> "virtual" column without caring where the data came from. I'll try to
> exemplify this:
>
> Query1.col1 $5
> Query1.col2 $5
> Query1.col3 $5
> Query2.col1 $3
> Query3.col1 $3
> Total ????
>
> I'm using a Grid to layout a 2-column arrangement for this and the actual
> values in the right column are Data objects. Notice that multiple data
> sources and columns are used. I can't just some up some single column from
> a single data source. I need to sum up the Grid's second column.
>
> Can anyone help?
>
> Thanks in Advance,
>
> Chris
>
>

Hi,

I have two suggestions for you:
1. Have you consider using UNION (or UNION ALL in oracle) for your
queries to join them together? You could add pseudo-column to your
queries to get to know which query your data comes from, or for grouping
purposes.

2. There is very interesting thread on this group

news://news.eclipse.org:119/dvuboo$jfp$1@utils.eclipse.org

where Scott Rosenbaum explains how to perform your own calculations over
subreports. If you don't like UNION than read this topic and you will
find the solution for sure.

Robert
Re: Summing up Data field values [message #149412 is a reply to message #149408] Thu, 30 March 2006 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.budner.abg.com.pl

look for threat "Own calculations"
Re: Summing up Data field values [message #149971 is a reply to message #149412] Fri, 31 March 2006 08:53 Go to previous message
Eclipse UserFriend
Originally posted by: cbredesen.comerxia.com

I see the thread. I'll try out that technique and post up my results if it
proves helpful to the group.

Many thanks,

Chris

"Robbo" <r.budner@abg.com.pl> wrote in message
news:e0gsla$uo7$2@utils.eclipse.org...
> look for threat "Own calculations"
Previous Topic:print[java-birt]
Next Topic:Chart Engine in Servlets
Goto Forum:
  


Current Time: Wed Jul 23 16:19:56 EDT 2025

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

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

Back to the top