I have a table within a document that will contain any amount of rows of data.
Some documents may have only one row of data and any could have
up to a max of 75 rows.
The program will read all of the elements from the xml file which will contain
empty elments for those that do not contain a value.
Because two of the columns are currency type data, the program
needs to format the data.
Below is the code that I have for the table. The question that I have is as when
a row has no data, how can I hide the empty cells? Is there anything that I
need to do for the two columns that I am formatting the values as currency such
as using an if statement or something in order to have the cells hidden?
When I tested this, I had the nan value appear in the columns for the currency
format. I realize they were empty values, but I do not want to have display.
I apologize for not explaining possibly as well as it should be, but I have
been teaching myself this stuff over the past two weeks and this is all
very new to me.
Thanks in advance for anyone's assistance, it is much appreciated.
jlr
<fo:block text-align="left">
<fo:table table-layout="fixed" border-collapse="collapse" >
<fo:table-column column-width="15mm"/>
<fo:table-column column-width="20mm"/>
<fo:table-column......../>
<fo:table-body>
<fo:table-row >
<fo:table-cell xsl:use-attribute-sets="cell-padding-all" border="solid black 0.5px"
>
<fo:block xsl:use-attribute-sets="detailtable">
<xsl:value-of select="header/column1"/>
</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell-padding-all" border="solid black 0.5px" >
<fo:block xsl:use-attribute-sets="lgdetailtable">
<xsl:value-of select="header/column2"/>
</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="numeric-cell" border="solid black 0.5px" >
<xsl:variable name="q">
<xsl:value-of select="header/column3"/>
</xsl:variable>
<fo:block xsl:use-attribute-sets="lgdetailright">
<xsl:value-of select="format-number($q,'$###,###,###.0000')"/>
</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="numeric-cell" border="solid black 0.5px" >
<xsl:variable name="q">
<xsl:value-of select="header/column4"/>
</xsl:variable>
<fo:block xsl:use-attribute-sets="lgdetailright">
<xsl:value-of select="format-number($q,'$###,###,###.0000')"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row >
<fo:table-cell xsl:use-attribute-sets="cell-padding-all" border="solid black 0.5px" >
<fo:block xsl:use-attribute-sets="detailtable">
<xsl:value-of select="header/column20"/>
</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="cell-padding-all" border="solid black 0.5px" >
<fo:block xsl:use-attribute-sets="lgdetailtable">
<xsl:value-of select="header/column21"/>
</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="numeric-cell" border="solid black 0.5px" >
<xsl:variable name="q">
<xsl:value-of select="header/column22"/>
</xsl:variable>
<fo:block xsl:use-attribute-sets="lgdetailright">
<xsl:value-of select="format-number($q,'$###,###,###.0000')"/>
</fo:block>
</fo:table-cell>
<fo:table-cell xsl:use-attribute-sets="numeric-cell" border="solid black 0.5px" >
<xsl:variable name="q">
<xsl:value-of select="header/column23"/>
</xsl:variable>
<fo:block xsl:use-attribute-sets="lgdetailright">
<xsl:value-of select="format-number$q,'$###,###,###.0000')"/>
</fo:block>
</fo:table-cell>
</fo:table-row>