Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tablehead bug #317

Closed
Demosteneus opened this issue Mar 2, 2021 · 1 comment
Closed

Tablehead bug #317

Demosteneus opened this issue Mar 2, 2021 · 1 comment
Assignees
Labels

Comments

@Demosteneus
Copy link
Contributor

Hi,

I think there is a bug involving Tablehead when we have the page attribute defined and we have one header for the first page and one header for all subsequent pages.
This bug only happens when we have a different number of rows in the two defined Tableheads.

Bellow you can see the case that has the bug. The header printed on subsequent pages doesn't have bottom padding.
image

If we delete from the first tablehead the rows with "Extra Title" and "Some additional text here" then the header from all subsequent pages will be printed correctly, with some padding.

The files needed to reproduce the issue.
data.xml:
<test></test>

layout.xml:

<Layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="layoutschema-en.xsd" xmlns:sd="urn:speedata:2009/publisher/functions/en" xmlns="urn:speedata.de:2009/publisher/en" xmlns:xi="http://www.w3.org/2001/XInclude" version="4.3.6">
    <Record element="test">
        <PlaceObject>
            <Table width="170mm">
                <Columns>
                    <Column width="4mm"/>
                    <Column width="66mm"/>
                    <Column width="34mm"/>                     
                    <Column width="66mm"/> 
                </Columns>
                <Tablehead page="first">
                    <Tr>
                        <Td padding-bottom="5pt" padding-top="5pt"></Td>
                        <Td colspan="3" align="center" padding-top="5pt" padding-bottom="5pt">
                            <Paragraph allowbreak=" " >
                                <U>							
                                    <Value select="'Title'"/>					
                                </U>
                            </Paragraph>
                        </Td>
                    </Tr>
                    <Tr>
                        <Td padding-top="5pt"></Td>
                        <Td colspan="3" align="center" padding-top="5pt">
                            <Paragraph allowbreak=" ">			
                                <Value select="'Extra Title'"/>
                            </Paragraph>
                        </Td>
                    </Tr>
                    <Tr>
                        <Td padding-top="8pt"></Td>
                        <Td colspan="3" align="left" padding-top="8pt">
                            <Paragraph allowbreak=" ">					
                                <Value select="'Some additional text here'"/>
                            </Paragraph>
                        </Td>
                    </Tr>
                    <Tr>
                        <Td padding-top="5pt" padding-bottom="5pt"></Td>
                        <Td align="left" padding-left="9pt" padding-right="9pt" padding-top="5pt" padding-bottom="5pt" border-left="1pt" border-top="1pt" border-bottom="1pt">
                            <Paragraph>
                                <B>
                                    <Value select="'Column 1'"/>
                                </B>
                            </Paragraph>
                        </Td>	
                        <Td align="left" padding-left="8pt" padding-right="8pt" padding-top="5pt" padding-bottom="5pt" border-left="1pt" border-top="1pt" border-bottom="1pt">
                            <Paragraph>
                                <B>
                                    <Value select="'Column 2'"/>
                                </B>
                            </Paragraph>
                        </Td>			
                        <Td align="left" padding-left="5pt" padding-right="5pt" padding-top="5pt" padding-bottom="5pt" border-left="1pt" border-right="1pt" border-top="1pt" border-bottom="1pt">
                            <Paragraph>
                                <B>
                                    <Value select="'Column 3'"/>
                                </B>
                            </Paragraph>
                        </Td>
                    </Tr>
                </Tablehead>
                <Tablehead page="all">
                    <Tr>
                        <Td></Td>
                        <Td colspan="3" align="center">
                            <Paragraph>
                                <U>							
                                    <Value select="'Title'"/>					
                                </U>
                            </Paragraph>
                        </Td>
                    </Tr>
                    <Tr>
                        <Td padding-top="5pt" padding-bottom="50pt"></Td>
                        <Td align="left" padding-left="9pt" padding-right="9pt" padding-top="5pt" padding-bottom="50pt" border-left="1pt" border-top="1pt" border-bottom="1pt">
                            <Paragraph>
                                <B>
                                    <Value select="'Column 1'"/>
                                </B>
                            </Paragraph>
                        </Td>	
                        <Td align="left" padding-left="8pt" padding-right="8pt" padding-top="5pt" padding-bottom="50pt" border-left="1pt" border-top="1pt" border-bottom="1pt">
                            <Paragraph>
                                <B>
                                    <Value select="'Column 2'"/>
                                </B>
                            </Paragraph>
                        </Td>			
                        <Td align="left" padding-left="5pt" padding-right="5pt" padding-top="5pt" padding-bottom="50pt" border-left="1pt" border-right="1pt" border-top="1pt" border-bottom="1pt">
                            <Paragraph>
                                <B>
                                    <Value select="'Column 3'"/>
                                </B>
                            </Paragraph>
                        </Td>
                    </Tr>
                </Tablehead>
               <Loop select="60" variable="i">
                    <Tr>
                        <Td padding-top="5pt" padding-bottom="5pt"></Td>
                        <Td padding-left="9pt" padding-right="9pt" padding-top="5pt" padding-bottom="5pt">
                            <Paragraph>
                                <Value select="$i"/>
                            </Paragraph>
                        </Td>
                        <Td align="center" padding-left="8pt" padding-right="8pt" padding-top="5pt" padding-bottom="5pt">
                            <Paragraph>
                                <Value select="$i"/>
                            </Paragraph>
                        </Td>
                        <Td align="left" padding-left="5pt" padding-right="5pt" padding-top="5pt" padding-bottom="5pt">
                            <Paragraph>
                                <Value select="$i"/>
                            </Paragraph>
                        </Td>								
                    </Tr>
                </Loop>	
            </Table>
        </PlaceObject>	
    </Record>
</Layout>
@pgundlach pgundlach self-assigned this Mar 4, 2021
@pgundlach pgundlach added the Bug label Mar 4, 2021
@pgundlach
Copy link
Member

Slightly shorter example:

<Layout xmlns:sd="urn:speedata:2009/publisher/functions/en" xmlns="urn:speedata.de:2009/publisher/en">
    <SetGrid nx="2" ny="8"/>
    <Pageformat height="5cm" width="5cm" />
    <Record element="data">
        <Pagetype name="t" test="true()">
            <PositioningArea name="a">
                <PositioningFrame width="1" height="5" row="1" column="1" />
                <PositioningFrame width="1" height="5" row="1" column="2" />
            </PositioningArea>
        </Pagetype>
        <PlaceObject area="a">
            <Table>
                <Tablehead page="first">
                    <Tr>
                        <Td>
                            <Paragraph><Value>A</Value></Paragraph>
                        </Td>
                    </Tr>
                    <Tr>
                        <Td padding-bottom="5pt" border-left="1pt" border-top="1pt" border-bottom="1pt">
                            <Paragraph><Value>B</Value></Paragraph>
                        </Td>
                    </Tr>
                </Tablehead>
                <Tablehead page="all">
                    <Tr>
                        <Td padding-bottom="5pt" border-left="1pt" border-top="1pt" border-bottom="1pt">
                            <Paragraph><Value>C</Value></Paragraph>
                        </Td>
                    </Tr>
                </Tablehead>
               <Loop select="2" variable="i">
                    <Tr>
                        <Td><Paragraph><Value select="$i"/></Paragraph></Td>
                    </Tr>
                </Loop>
            </Table>
        </PlaceObject>
    </Record>
</Layout>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants