Conditional formatting of a table column

157 views
Skip to first unread message

Graham, Ben

unread,
Oct 2, 2011, 6:15:55 PM10/2/11
to intersys...@googlegroups.com
I have the following XML, and am trying to format the body / exam information as possible.

For each <OBX>, if there is an <OBX-5> then display a row consisting of 4 columns: <OBX-3>, <OBX-5>, <OBX-6>, <OBX-7>

otherwise if there is an NTE, then display an empty column for <OBX-3>, followed by the <NTE-3> <br /> - span across 3 columns.

I can get a report consisting of the <OBX-3><OBX-5><OBX-6><OBX-7>

I am trying to figure out how to get the <NTE-3> to display and/or for the comments to span across 3 columns.

Thanks,

Ben

________________________________

This electronic transmission and any documents accompanying this electronic transmission may contain information that is confidential and/or legally privileged. The information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on or regarding the contents of this electronically transmitted information is strictly prohibited. If you have received this e-mail in error, please notify the sender and delete this message immediately.

Jonathan Levinson

unread,
Oct 3, 2011, 9:46:16 AM10/3/11
to intersys...@googlegroups.com
Maybe you can take advantage of the following:

First here is link to doc: http://localhost:57783/csp/docbook/DocBook.UI.Page.cls?KEY=GRPT_common_display_elements#GRPT_C172994

Change 57783 to your Webport.

-JSL2712 Support complex headers which can be more than one line and involve colspan and rowspan

This is first in 2010.1:

To better support complex header types that can exceed one line and can involve headers that take multiple rows or multiple columns we support three new ZEN Report elements.

<thead>

<tr>

<th>

<th> also talkes colspan and rowspan attributes.

These are valid for both HTML and PDF and act like the corresponding entities named in HTML.

Note how an item determines the "contents" of <th>.

Note that if the table uses <thead> and its children then the table must have NO captions; it must be caption-free. Captions and <thead> are mutually incompatible.

Here is a simple example:

/// XML description for the display of this report. Used to generate
/// XSlT stylesheets for both HTML and XSL-FO
XData ReportDisplay [ XMLNamespace = "http://www.intersystems.com/zen/report/display" ]
{
<report xmlns="http://www.intersystems.com/zen/report/display"
name='myReport' title='HelpDesk SalesPeople By State' style='standard'>
<document width="8.5in" height="11in" marginLeft="1.25in" marginRight="1.25in" marginTop="1.0in" marginBottom="1.0in">
</document>

<body>

<group name="SalesReps">
<table group="SaleRep" orient="col" width="6in" class="table4" altcolor="#DFDFFF" orderby="@state" >
<thead style="color:red">
<tr>
<th>
<item value="# " width=".45in"/>
</th>
<th>
<item value="name" width="2.65in"/>
</th>
<th>
<item value="state" width="2.65in"/>
</th>
</tr>
</thead>
<item special="number" width=".45in" style="color: darkblue;" >
</item>
<item field="@name" width="2.65in">
</item>
<item field="@state" width="2.65in">
</item>
</table>
</group>
</body>
</report>
}

Here is a more complex example showing colspan use in a two-line header. Previously ZEN Reports only handled well a one-line header.

/// XML description for the display of this report. Used to generate
/// XSlT stylesheets for both HTML and XSL-FO
XData ReportDisplay [ XMLNamespace = "http://www.intersystems.com/zen/report/display" ]
{
<report xmlns="http://www.intersystems.com/zen/report/display"
name='myReport' title='HelpDesk SalesPeople By State' style='standard'>
<document width="8.5in" height="11in" marginLeft="1.25in" marginRight="1.25in" marginTop="1.0in" marginBottom="1.0in">
</document>

<body>

<group name="SalesReps">
<table group="SaleRep" orient="col" width="6in" class="table4" altcolor="#DFDFFF" orderby="@state" >
<thead style="color:red">
<tr style="color:blue">
<th colspan="2">
<item value="identity"/>
</th>
<th>
<item value="loc"/>
</th>
</tr>
<tr>
<th>
<item value="# " width=".45in"/>
</th>
<th>
<item value="name" width="2.65in"/>
</th>
<th>
<item value="state" width="2.65in"/>
</th>
</tr>
</thead>
<item special="number" width=".45in" style="color: darkblue;" >
</item>
<item field="@name" width="2.65in">
</item>
<item field="@state" width="2.65in">
</item>
</table>
</group>
</body>
</report>
}

JSL3358 - Support rowspan and colspan in all elements that can be table output

This is first in 2011.1.

Support rowspan and colspan in all elements that can be table output. These are elements such as th, td, and item that extend tableOutput.

In HTML rendering, rowspan and colspan translate to these attributes.

In PDF rendering, rowspan and colspan translate to number-rows-spanned and number-columns-spanned.

Here is an example:

<tbody>
<tr>
<th rowspan="2" style="color:purple"> <item value="People"/></th>
<td><item value="1"/></td>
<td><item value="Jon"/></td>
<td><item value="MA"/></td>
</tr>
<tr>
<td><item value="2"/></td>
<td><item value="Jane"/></td>
<td><item value="MA"/></td>
</tr>

Best Regards,
Jonathan Levinson
Senior Software Developer
Object Group
InterSystems
+1 617-621-0600
jonathan...@intersystems.com

> --
> You received this message because you are subscribed to the Google Groups
> "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com To
> unsubscribe from this group, send email to InterSystems-ZEN-
> unsub...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions:
> http://groups.google.com/group/InterSystems-ZEN/web/community-terms-
> and-conditions

Reply all
Reply to author
Forward
0 new messages