xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Georg Datterl" <georg.datt...@geneon.de>
Subject AW: Sobtotal per Page
Date Fri, 17 Jul 2009 10:17:22 GMT
Hi Carsten,

I don't think you can skip the marker part. You don't have a way to know, when the table will
be broken to the next page. Without that, you don't know which lines to add up. You have two
problems. One is, how to calculate the values. That's an XSL Problem and can be solved with
the template below, I guess. But still, you get "running-sum" for each line and have to use
(second problem:) a marker to grab the last "running-sum" on the page to display in the footer.

Georg Datterl
------ Kontakt ------
Georg Datterl
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
Weitere Mitglieder der Willmy MediaGroup:
IRS Integrated Realization Services GmbH:    www.irs-nbg.de 
Willmy PrintMedia GmbH:                            www.willmy.de
Willmy Consult & Content GmbH:                 www.willmycc.de 
-----Ursprüngliche Nachricht-----
Von: Carsten B. [mailto:c.buehler@xdot.de] 
Gesendet: Freitag, 17. Juli 2009 12:11
An: fop-users@xmlgraphics.apache.org
Betreff: Re: Sobtotal per Page


I finally i found something. But I have a problem in calling the template.
What ist wrong, can't figure it out.

<!--- Template to calculate Subtotals --> <xsl:template mode="do-sum" match="Auftrag">
            <xsl:param name="sum" select="0"/>
            <xsl:variable name="running-sum"
                          select="number(translate($sum + number(Auftragssumme),'.',''))"/>
                <xsl:when test="following-sibling::Rechnung">
                    <xsl:apply-templates mode="do-sum"
                        <xsl:with-param name="sum" select="$running-sum"/>
                    <xsl:value-of select="format-number($running-sum,
'#.##0,00', 'numfrmt')"/>
        <xsl:template name="getSubtotal">
               <!-- <xsl:apply-templates mode="do-sum"
<!-- End Template calculating subtotals -->

                <fo:simple-page-master master-name="Rechnung"
page-width="8.5in" page-height="11in">

                    <fo:region-body region-name="PageBody"
margin-top="1.5in" margin-left="0.8in"
                    <fo:region-before region-name="Header" extent="1.2in"
                    <fo:region-after region-name="Footer" extent="1in"/>
            <fo:page-sequence master-reference="Rechnung">
                <!-- Rechnungsnumemr und Seitenzahl-->
                <fo:static-content flow-name="Header">

                <!-- Footer -->
                <!--<fo:static-content flow-name="Footer"> -->
                <fo:static-content flow-name="Footer">
                      <fo:block-container position="absolute" left="4.65in"
top="40%" height="1in" width="100%">
                        <!--  <fo:retrieve-marker retrieve-class-name="title"
                       retrieve-boundary="page"/> -->

                        <fo:block font-size="9pt">Zwischensumme:
                            ### Call Template ####
                            <xsl:call-template name="getSubtotal"/>

                <!-- Footer Ende -->

I don't know what wrong and where zo put my templates. Everytime I get "the-template-could-not-be-found".

I skipped dealing with markers, because I couldn't figure out how to call the "last marker"
on a page.

Sorry about this nooby questions.

View this message in context: http://www.nabble.com/Sobtotal-per-Page-tp24519516p24531834.html
Sent from the FOP - Users mailing list archive at Nabble.com.

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

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

View raw message