Re: Subtotals by page
Thankx Eliot Lets say I have 22 rows in the body region of my documents and then I generate the footer which contains the page total value for that page. But using the sum() function is xsl I am able to generate the running total as well as the total for the previous page as follows: Running total: -------------- <fo:marker marker-class-name="page-total"> <xsl:value-of select="format-number(sum(preceding::itemprice) + itemprice, '#,##0.00')"/> </fo:marker> Total for the previous page: ---------------------------- <fo:marker marker-class-name="part-sum"> <xsl:value-of select="format-number(sum(preceding::itemprice), '#,##0.00')"/> </fo:marker> Now what I actually want is the page total on this page: which would be the value I get when I subtract the above two values like this: pagetotal - partsum In XSL-FO it is not possible to do this. So my question is even if I do know the number of rows how do I make it sum that many number of rows? Regards, S but the question is how do I tell the processor to sum the --- Eliot Kimber <ekimber@xxxxxxxxxxxxxxxxxxx> wrote: > Jaine_e wrote: > > > > > >>You haven't said what medium you are using for the > >>final format. > >> > > > > > > I'm using XSL-FO for the final formatting > > There's no direct way to do this with XSL-FO 1.0 as > there's no way to > know, in the general case, when your table will go > to a new page. > However, if the depth of your rows is fixed and the > start point of your > table is consistent then you should be able to > determine accurately how > many rows will go on a page and therefore you can > generate the "footer" > row (which will just be a normal row) as part of > your XSLT process. > > XSL-FO 1.1 adds a new feature, table markers, which > allows you to use > markers in table headers and footers. This will let > you do exactly what > you want in a very direct way. > > As mentioned by David C., you can also use some form > of two-pass process > depending on the features of the XSL-FO > implementation you are using. > > Cheers, > > E. > -- > W. Eliot Kimber > Professional Services > Innodata Isogen > 9390 Research Blvd, #410 > Austin, TX 78759 > (512) 372-8122 > > ekimber@xxxxxxxxxxxxxxxxxxx > www.innodata-isogen.com > > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format