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 Ian Waggoner <Ia...@cs.oag.state.tx.us> on 2002/08/22 19:53:24 UTC

conditionally displaying portion of table-header

Hi,

I'm having trouble figuring out how to display all of the table header on the first page that the table spans and only a portion of it on subsequent pages.

To clarify, suppose the objective is to generate a pdf that displays summary and transaction info for credit card accounts. The structure of the xml doc goes something like: you have a list of account nodes, each account node has number, name, balance, due date, and transactions child nodes; each transactions node has a long list of transaction nodes (which of course have date, type, amount, etc. nodes). 

What I want to do is setup a table where the account summary info displays in table-header of the table and the transactions are in table-body. But if one person's account transactions span multiple pages I only want to display a subset of the summary data - just name and account number, say. So is there a way to say "only display this header info if we're on the page this table starts on"?

Thanks,
Ian


____________________________
ian.waggoner@cs.oag.state.tx.us



RE: conditionally displaying portion of table-header

Posted by Roland Neilands <rn...@pulsemining.com.au>.
Ian,

> I'm having trouble figuring out how to display all of the
> table header on the first page that the table spans and only
> a portion of it on subsequent pages.
>
> To clarify, suppose the objective is to generate a pdf that
> displays summary and transaction info for credit card
> accounts. The structure of the xml doc goes something like:
> you have a list of account nodes, each account node has
> number, name, balance, due date, and transactions child
> nodes; each transactions node has a long list of transaction
> nodes (which of course have date, type, amount, etc. nodes).
>
> What I want to do is setup a table where the account summary
> info displays in table-header of the table and the
> transactions are in table-body. But if one person's account
> transactions span multiple pages I only want to display a
> subset of the summary data - just name and account number,
> say. So is there a way to say "only display this header info
> if we're on the page this table starts on"?
Try:
<fo:table table-omit-header-at-break="false">
  <fo:table-column ... >
  <fo:table-header>
    <fo:table-row > Static info </fo:table-row>
  </fo:table-header>
  <fo:table-row > One-off header stuff </fo:table-row>    <!-- Format like
the header -->
  <fo:table-row > ordinary row </fo:table-row>
</fo:table>

If you need different data in the same row, try markers (& static-content)
instead; check the examples.

Regards,
Roland