xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
Subject Re: Sobtotal per Page
Date Thu, 16 Jul 2009 20:26:13 GMT
On 16.07.2009 18:11, Carsten B. wrote:
> i searching about 2 days now. I need a subtotal on each page.

That's known to be a difficult problem.

>          <fo:marker marker-class-name="title">
>                  <xsl:value-of select="$totalsum"/>
>          <!--- I need the subtotal on at this place --->
>          </fo:marker>
Here's the rub: the transformation stage and the formatting
stage are two separate processes. There is no way the
transformation can know which positions are put on a page
by the formatting process, and the layout process can't add
up numbers. That's the way it is.

You can try one of the following approaches:
- If the positions all take up the same vertical space, e.g.
  a single line or two lines, you can paginate them in the
  transformation (look up "grouping by position"), and you
  can calculate the subtotal in the transformation.
- You can use a two pass approach: run the whole process using
  fixed dummy subtotals, extract the positions on the pages
  from the result, then run the process again with a
  transformation with explicit pagination. The area tree output
  or the new intermediate format (trunk only) make it relatively
  easy to get which positions are on which pages.
- Run the transformation using fixed dummy subtotals, then use
  the intermediate format (trunk only) to hook in some
  additional code which calculates the real subtotals and replace
  the dummy values. You will probably have to do some extended
  magic to get the numbers right aligned.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message