You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Tiku Ram Arya <ar...@gmail.com> on 2009/10/12 14:11:50 UTC

Urgent help needed

Hi,
Is there a way to control the table break?
I mean to say when table break then I want to insert some object such as
block or any row.
Is it possible?
Please guide me for this.

-- 
With Regards
-----------------------------------------------------------------------------------------------------------
Tiku Ram Arya
Associate Application Developer
Computer Sciences Corporation | Hyderabad | India.
-----------------------------------------------------------------------------------------------------------

Re: Urgent help needed

Posted by Venkat Reddy <va...@googlemail.com>.
Hi,

The attached example might help...

Thanks,
Venkat.

Tiku Ram Arya wrote:
> Hi,
> Is there a way to control the table break?
> I mean to say when table break then I want to insert some object such 
> as block or any row.
> Is it possible?
> Please guide me for this.
>
> -- 
> With Regards
> -----------------------------------------------------------------------------------------------------------
> Tiku Ram Arya
> Associate Application Developer
> Computer Sciences Corporation | Hyderabad | India.
> -----------------------------------------------------------------------------------------------------------


Re: Urgent help needed

Posted by Tiku Ram Arya <ar...@gmail.com>.
Hi Crish,
I have attached a PDF with this mail.
When you open it, take a look at the table inside the body when it breaks it
leaves some space.
for your reference XSL code is below:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <xsl:output method="xml" indent="yes"/>
    <!-- Root template -->
    <xsl:template match="/">
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:xfo="http://xsl.apache.org/fop/extensions">
            <!-- Master lay out part should define clearly what are the
different pages we will have
this part will have the page definition also like what is width, height,
margine etc-->
            <!-- for loop to get the page for each purchase order -->
            <fo:layout-master-set>
                <fo:simple-page-master page-widht="8.5in"
                                       page-height="11in"
master-name="first" margin="0.5in">
                    <!-- this will be the first page for our template -->
                    <fo:region-body background-color="yellow"
margin-top="0in" margin-bottom="0in"/>
                    <fo:region-before start-indent="0in" end-indent="0in"
background-color="green"/>
                    <fo:region-after region-name="firstFoot"
background-color="green"/>
                </fo:simple-page-master>
            </fo:layout-master-set>
            <!-- second section of the page layout comes here where all the
content will resides -->
            <xsl:for-each
select="PO_PRINT_97/LIST_G_PO_HEADER_ID/G_PO_HEADER_ID">
                <fo:page-sequence master-reference="first"
                                  initial-page-number="1">
                    <!-- here we can have access to all the part of the page
such as header, footer, body etc
    each content will come inside the block and the block will come inside
either flows or static content -->
                    <fo:static-content flow-name="xsl-region-before">
                         <fo:block>
                            this is header
                        </fo:block>
                         <fo:block>
                            this is header
                        </fo:block>
                         <fo:block>
                            this is header
                        </fo:block>
                         <fo:block>
                            this is header
                        </fo:block>
                         <fo:block>
                            this is header
                        </fo:block>
                         <fo:block>
                            this is header
                        </fo:block>
                         <fo:block>
                            this is header
                        </fo:block>
                         <fo:block>
                            this is header
                        </fo:block>
                         <fo:block>
                            this is header
                        </fo:block>
                    <!-- end of supplier information table -->
                    </fo:static-content>
                    <!-- end of the header for the the page -->
                    <!-- footer content for the rest of the page -->
                    <fo:static-content flow-name="firstFoot">
                    <fo:block>
                            this is footer
                        </fo:block>
                         <fo:block>
                            this is footer
                        </fo:block>
                         <fo:block>
                            this is footer
                        </fo:block>
                         <fo:block>
                            this is footer
                        </fo:block>
                         <fo:block>
                            this is footer
                        </fo:block>
                         <fo:block>
                            this is footer
                        </fo:block>
                         <fo:block>
                            this is footer
                        </fo:block>
                         <fo:block>
                            this is footer
                        </fo:block>
                    </fo:static-content>
                    <!-- end of the footer content for the last page -->
                    <!-- start footer content for the last page -->
                    <fo:flow flow-name="xsl-region-body">
                        <!-- line information tables -->
                    <fo:block height="100%" background-color="red"
space-after.optimum="2px">
                        <fo:table border="solid thick black"
table-layout="auto" >
                        <fo:table-column/>
                        <fo:table-column/>
                        <fo:table-column/>
                        <fo:table-column/>
                        <fo:table-column/>
                        <fo:table-column/>
                        <fo:table-column/>
                        <fo:table-column/>
                        <fo:table-column/>
                        <fo:table-column/>
                        <fo:table-footer>
                             <fo:table-row>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                            </fo:block>
                                        </fo:table-cell>
                            </fo:table-row>
                        </fo:table-footer>
                        <fo:table-body>
                                <xsl:for-each
select="LIST_G_LINE_NUM/G_LINE_NUM">
                                    <!-- <fo:marker
marker-class-name="page-total">
                        <fo:block>
                                <xsl:value-of
select="format-number(sum(preceding::AMOUNT) + AMOUNT, '#,##0.00')"/>
                        </fo:block>

                    </fo:marker>
                    -->
                                    <fo:table-row>
                                        <fo:table-cell border-left="solid
thick black">
                                            <fo:block margin="5px"
                                            number-rows-spanned="5">
                                                <xsl:value-of
select="LINE_NUM"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                                <xsl:value-of
select="UOM_CODE"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                                <xsl:value-of
select="QUANTITY"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                                             <xsl:value-of
select="ITEM_NUMBER"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" >
                                            <fo:block margin="5px">
                                                <xsl:value-of
select="ITEM_DESCRIPTION"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" text-align="center" >
                                            <fo:block margin="5px">
                                                xxxx
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" text-align="center" >
                                            <fo:block margin="5px">
                                            xxxx
                                            </fo:block>
                                        </fo:table-cell>
                                         <fo:table-cell border-left="solid
thick black" border-right="solid thick black" text-align="right" >
                                            <fo:block margin="5px">
                                                    <xsl:value-of
select="UNIT_PRICE"/>
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" border-right="solid thick black" text-align="right" >
                                            <fo:block margin="5px">
                                                xxxxx
                                            </fo:block>
                                        </fo:table-cell>
                                        <fo:table-cell border-left="solid
thick black" border-right="solid thick black" text-align="right">
                                            <fo:block margin="5px">
                                                <xsl:value-of
select="AMOUNT"/>
                                            </fo:block>
                                        </fo:table-cell>
                                    </fo:table-row>
                                </xsl:for-each>
                                <!-- end of the line iteration -->
                            </fo:table-body>
                        </fo:table>
                    </fo:block>
                    </fo:flow>
                </fo:page-sequence>
            </xsl:for-each>
        </fo:root>
    </xsl:template>
</xsl:stylesheet>




On Mon, Oct 12, 2009 at 7:15 PM, Venkat Reddy <
vanukuri.venkat@googlemail.com> wrote:

> Hi,
>
> Can you please attach your sample? So that I will have a look at the
> problem exactly what you are facing...
>
> Thanks,
> Venkat.
> Tiku Ram Arya wrote:
>
>> Hi Chris,
>> My problem is : when no. of rows printed on the table and table break's,
>> some amount of space left after it which causing some gap between the table
>> footer and the page footer.
>> How can I set the table property in such a way So when table break's it
>> should consume complete body area( I mean 100%)
>>
>> On Mon, Oct 12, 2009 at 6:44 PM, Chris Bowditch <
>> bowditch_chris@hotmail.com <ma...@hotmail.com>> wrote:
>>
>>    Tiku Ram Arya wrote:
>>
>>        Hi,
>>        Is there a way to control the table break?
>>        I mean to say when table break then I want to insert some
>>        object such as block or any row.
>>        Is it possible?
>>
>>
>>    XSL-FO v1.1 has a table-marker feature. This could be used to
>>    inject optional content on a page break. Unfortunately FOP doesn't
>>    currently implement table markers. The workaround is to use
>>    regular markers which must be retrieved into page header/footer
>>    rather than table header/footer which isn't brilliant.
>>
>>    Chris
>>
>>
>>        Please guide me for this.
>>
>>        --        With Regards
>>
>>  -----------------------------------------------------------------------------------------------------------
>>        Tiku Ram Arya
>>        Associate Application Developer
>>        Computer Sciences Corporation | Hyderabad | India.
>>
>>  -----------------------------------------------------------------------------------------------------------
>>
>>
>>
>>    ---------------------------------------------------------------------
>>    To unsubscribe, e-mail:
>>    fop-users-unsubscribe@xmlgraphics.apache.org
>>    <ma...@xmlgraphics.apache.org>
>>    For additional commands, e-mail:
>>    fop-users-help@xmlgraphics.apache.org
>>    <ma...@xmlgraphics.apache.org>
>>
>>
>>
>>
>> --
>> With Regards
>>
>> -----------------------------------------------------------------------------------------------------------
>> Tiku Ram Arya
>> Associate Application Developer
>> Computer Sciences Corporation | Hyderabad | India.
>>
>> -----------------------------------------------------------------------------------------------------------
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>


-- 
With Regards
-----------------------------------------------------------------------------------------------------------
Tiku Ram Arya
Associate Application Developer
Computer Sciences Corporation | Hyderabad | India.
-----------------------------------------------------------------------------------------------------------

Re: Urgent help needed

Posted by Venkat Reddy <va...@googlemail.com>.
Hi,

Can you please attach your sample? So that I will have a look at the 
problem exactly what you are facing...

Thanks,
Venkat.
Tiku Ram Arya wrote:
> Hi Chris,
> My problem is : when no. of rows printed on the table and table 
> break's, some amount of space left after it which causing some gap 
> between the table footer and the page footer.
> How can I set the table property in such a way So when table break's 
> it should consume complete body area( I mean 100%)
>
> On Mon, Oct 12, 2009 at 6:44 PM, Chris Bowditch 
> <bowditch_chris@hotmail.com <ma...@hotmail.com>> wrote:
>
>     Tiku Ram Arya wrote:
>
>         Hi,
>         Is there a way to control the table break?
>         I mean to say when table break then I want to insert some
>         object such as block or any row.
>         Is it possible?
>
>
>     XSL-FO v1.1 has a table-marker feature. This could be used to
>     inject optional content on a page break. Unfortunately FOP doesn't
>     currently implement table markers. The workaround is to use
>     regular markers which must be retrieved into page header/footer
>     rather than table header/footer which isn't brilliant.
>
>     Chris
>
>
>         Please guide me for this.
>
>         -- 
>         With Regards
>         -----------------------------------------------------------------------------------------------------------
>         Tiku Ram Arya
>         Associate Application Developer
>         Computer Sciences Corporation | Hyderabad | India.
>         -----------------------------------------------------------------------------------------------------------
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail:
>     fop-users-unsubscribe@xmlgraphics.apache.org
>     <ma...@xmlgraphics.apache.org>
>     For additional commands, e-mail:
>     fop-users-help@xmlgraphics.apache.org
>     <ma...@xmlgraphics.apache.org>
>
>
>
>
> -- 
> With Regards
> -----------------------------------------------------------------------------------------------------------
> Tiku Ram Arya
> Associate Application Developer
> Computer Sciences Corporation | Hyderabad | India.
> -----------------------------------------------------------------------------------------------------------


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


Re: Urgent help needed

Posted by Tiku Ram Arya <ar...@gmail.com>.
Hi Chris,
My problem is : when no. of rows printed on the table and table break's,
some amount of space left after it which causing some gap between the table
footer and the page footer.
How can I set the table property in such a way So when table break's it
should consume complete body area( I mean 100%)

On Mon, Oct 12, 2009 at 6:44 PM, Chris Bowditch
<bo...@hotmail.com>wrote:

> Tiku Ram Arya wrote:
>
>> Hi,
>> Is there a way to control the table break?
>> I mean to say when table break then I want to insert some object such as
>> block or any row.
>> Is it possible?
>>
>
> XSL-FO v1.1 has a table-marker feature. This could be used to inject
> optional content on a page break. Unfortunately FOP doesn't currently
> implement table markers. The workaround is to use regular markers which must
> be retrieved into page header/footer rather than table header/footer which
> isn't brilliant.
>
> Chris
>
>  Please guide me for this.
>>
>> --
>> With Regards
>>
>> -----------------------------------------------------------------------------------------------------------
>> Tiku Ram Arya
>> Associate Application Developer
>> Computer Sciences Corporation | Hyderabad | India.
>>
>> -----------------------------------------------------------------------------------------------------------
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>


-- 
With Regards
-----------------------------------------------------------------------------------------------------------
Tiku Ram Arya
Associate Application Developer
Computer Sciences Corporation | Hyderabad | India.
-----------------------------------------------------------------------------------------------------------

Re: Urgent help needed

Posted by Chris Bowditch <bo...@hotmail.com>.
Tiku Ram Arya wrote:
> Hi,
> Is there a way to control the table break?
> I mean to say when table break then I want to insert some object such as 
> block or any row.
> Is it possible?

XSL-FO v1.1 has a table-marker feature. This could be used to inject 
optional content on a page break. Unfortunately FOP doesn't currently 
implement table markers. The workaround is to use regular markers which 
must be retrieved into page header/footer rather than table 
header/footer which isn't brilliant.

Chris

> Please guide me for this.
> 
> -- 
> With Regards
> -----------------------------------------------------------------------------------------------------------
> Tiku Ram Arya
> Associate Application Developer
> Computer Sciences Corporation | Hyderabad | India.
> -----------------------------------------------------------------------------------------------------------


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