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. 

Regards,
 
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
 
www.geneon.de
 
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.bueh...@xdot.de] 
Gesendet: Freitag, 17. Juli 2009 12:11
An: fop-users@xmlgraphics.apache.org
Betreff: Re: Sobtotal per Page


Hi,

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:choose>
                <xsl:when test="following-sibling::Rechnung">
                    <xsl:apply-templates mode="do-sum"
select="following-sibling::Auftrag[1]">
                        <xsl:with-param name="sum" select="$running-sum"/>
                    </xsl:apply-templates>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="format-number($running-sum,
'#.##0,00', 'numfrmt')"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <xsl:template name="getSubtotal">
                Subtotal:
               <!-- <xsl:apply-templates mode="do-sum"
select="/Root/Rechnung/Auftrag[1]"/>-->
        </xsl:template>
<!-- End Template calculating subtotals -->




            <fo:layout-master-set>
                <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"
                                    margin-bottom="0.8in"/>
                    <fo:region-before region-name="Header" extent="1.2in"
margin-left="0.8in"/>
                    <fo:region-after region-name="Footer" extent="1in"/>
                </fo:simple-page-master>
            </fo:layout-master-set>
            <fo:page-sequence master-reference="Rechnung">
                <!-- Rechnungsnumemr und Seitenzahl-->
                <fo:static-content flow-name="Header">
                  [...]
                </fo:static-content>

                <!-- 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-position="first-starting-within-page"
                       retrieve-boundary="page"/> -->

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

                    </fo:block-container>
                </fo:static-content>
                <!--</fo:static-content>-->
                <!-- 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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


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

Reply via email to