Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » subtotals for multipage tables
subtotals for multipage tables [message #551133] Thu, 05 August 2010 11:25 Go to next message
xoto is currently offline xotoFriend
Messages: 7
Registered: August 2010
Junior Member
hi there,

due to the amount of rows a given table has to be printed on several pages. to improve the lucidity on each page a subtotal of those values that are written on it should be displayed. furthermore the sum of all values of a specific column on previous pages and the current one has to be shown.

Example - Phone Bill listing all outbounding calls
Page 1:
Call Number | Duration | Costs
0123456789 | 00:02:31 | 0.57
0246810121 | 00:09:48 | 1.90
.
.
.
7773334441 | 00:00:58 | 0.19
Sum costs on this page 6.13
Sum costs incl. this page 6.13
------------------------------------------------------------ --------
Page 2:
Call Number | Duration | Costs
0123456781 | 00:02:31 | 0.57
0246810121 | 00:09:48 | 1.90
.
.
.
7773334441 | 00:00:58 | 0.19
Sum costs on this page 9.32
Sum costs incl. this page 15.45

is there a way to do this?
thanks for your answers
Re: subtotals for multipage tables [message #551415 is a reply to message #551133] Fri, 06 August 2010 11:06 Go to previous messageGo to next message
xoto is currently offline xotoFriend
Messages: 7
Registered: August 2010
Junior Member
i made a try by grouping my data on RowNum with interval range 40.

in group footer:

  1. an aggregate that sums up row["costs"] within the group
  2. an aggregate that sums up the aggregate in 1. with RUNNINGSUM

in group header:
a data element that substracts aggregate 1 from aggregate 2
(so additionally the sum of costs on all previous pages is displayed at the top of each page)

the only problem appears if the first page does not only contain the table.
via "use fixed base value for interval" you can arrange it by hand.

is there a more elegant way to do this?

Re: subtotals for multipage tables [message #551460 is a reply to message #551415] Fri, 06 August 2010 14:18 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You may be able to use page variables for this. Page variables can be
recalculated per page and put in the head or footer. Take a look at
this example:
http://www.birt-exchange.org/org/devshare/designing-birt-rep orts/1084-page-script-samples/

Its not what you want but should give you an idea of how they work.

Jason

On 8/6/2010 7:06 AM, xoto wrote:
> i made a try by grouping my data on RowNum with interval range 40.
> in group footer:
>
> an aggregate that sums up row["costs"] within the group
> an aggregate that sums up the aggregate in 1. with RUNNINGSUM
>
> in group header:
> a data element that substracts aggregate 1 from aggregate 2
> (so additionally the sum of costs on all previous pages is displayed at
> the top of each page)
>
> the only problem appears if the first page does not only contain the
> table. via "use fixed base value for interval" you can arrange it by hand.
>
> is there a more elegant way to do this?
>
>
Re: subtotals for multipage tables [message #551905 is a reply to message #551460] Tue, 10 August 2010 06:31 Go to previous messageGo to next message
xoto is currently offline xotoFriend
Messages: 7
Registered: August 2010
Junior Member
thanks for your anwser

unfortunately i'm not able to understand what preferences you changed.
neither the birt help nor the internet has given me a clue relating to variables.

you may explain what to do if i want to insert page numbers. surely the concept would be easier for me to understand.

thanks for your help
Re: subtotals for multipage tables [message #552029 is a reply to message #551905] Tue, 10 August 2010 15:04 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Tell me if this example makes more sense:
http://www.birt-exchange.org/org/devshare/designing-birt-rep orts/1247-page-totals-using-page-variables/

Jason

On 8/10/2010 2:31 AM, xoto wrote:
> thanks for your anwser
>
> unfortunately i'm not able to understand what preferences you changed.
> neither the birt help nor the internet has given me a clue relating to
> variables.
>
> you may explain what to do if i want to insert page numbers. surely the
> concept would be easier for me to understand.
>
> thanks for your help
Re: subtotals for multipage tables [message #552228 is a reply to message #552029] Wed, 11 August 2010 11:20 Go to previous messageGo to next message
xoto is currently offline xotoFriend
Messages: 7
Registered: August 2010
Junior Member
Jason Weathersby wrote on Tue, 10 August 2010 11:04
Tell me if this example makes more sense:
http://www.birt-exchange.org/org/devshare/designing-birt-rep orts/1247-page-totals-using-page-variables/

Jason


Yeah this is very helpful.
Thank you very much!!

It works well with the BIRT report in web viewer. But strangely if you display it as pdf all variable values are shown one page behind the correct position Confused

Are there possibilities to insert the page total into the table header?

I tried the other way too. It occurs that instead of taking the first row on this page the first one on the next page is added!? This appears here even in your example.
Re: subtotals for multipage tables [message #552538 is a reply to message #552228] Thu, 12 August 2010 14:37 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Page variables are only supported currently when using two processes to
run BIRT. Ie /frameset in the webviewer and runtask then a rendertask
in the API. Can you open in the viewer then export to pdf?

This may change as there is a bug request to enhance them.

Jason

On 8/11/2010 7:20 AM, xoto wrote:
> Jason Weathersby wrote on Tue, 10 August 2010 11:04
>> Tell me if this example makes more sense:
>> http://www.birt-exchange.org/org/devshare/designing-birt-rep
>> orts/1247-page-totals-using-page-variables/
>>
>> Jason
>
> Yeah this is very helpful.
> Thank you very much!!
>
> It works well with the BIRT report in web viewer. But strangely if you
> display it as pdf all variable values are shown one page behind the
> correct position :?
> Are there possibilities to insert the page total into the table header?
> I tried the other way too. It occurs that instead of taking the first
> row on this page the first one on the next page is added!? This appears
> here even in your example.
>
Re: subtotals for multipage tables [message #552666 is a reply to message #551133] Fri, 13 August 2010 06:12 Go to previous message
xoto is currently offline xotoFriend
Messages: 7
Registered: August 2010
Junior Member
great, now it works. thanks a lot Very Happy
Previous Topic:Chart Engine API - how to implement zoom
Next Topic:Number formatting in BIRT 2.3.1
Goto Forum:
  


Current Time: Thu Apr 25 15:51:28 GMT 2024

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

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

Back to the top