zen report - concat two field together

25 views
Skip to first unread message

Jedi Knight

unread,
Oct 16, 2017, 3:48:04 AM10/16/17
to InterSystems: Zen Community
hi all

quick question I hope

two Element
<element name="FName" field="FName" />
<element name="SName" field="SName" />

report display

<table style="font-weight: bold;background-color: white" orient='row' foStyle="keep-with-next.within-line='always'">
<table orient='col' ifxpath="normalize-space(/ZENReport/ZENReportData/FName)!=&quot;&quot;" foStyle="keep-with-next.within-line='always'">
<item  value='Name:'  class="trakquestcaptionitem" width="1.3in"  />
<table ifxpath="normalize-space(/ZENReport/ZENReportData/FName)!=&quot;&quot;">
<item field='/ZENReport/ZENReportData/FName' class="trakquestitem" />
<item field='/ZENReport/ZENReportData/SName' class="trakquestitem" />
</table>
</table>
</table>

how can I get FName and SName to be into one "field"
unable to the SP :(

with a comma between them
like

SName + , + FName

regards



woodware.sy...@gmail.com

unread,
Oct 17, 2017, 9:06:09 AM10/17/17
to InterSystems: Zen Community
Jedi,

    Two methods.  One in the Report section, one in the Definitions section.

    Report section.

<block>
     <item field='SName'/>
     <item value=', '/>
     <item field='FName'/>
    <block>

    Definition section

    Assuming SName and Fname are the variables from the sql statement or from the xml source:

    In Defintion:

    <element name="CName" fields="SName,FName" expression='%var("SName")_", "_%var(("FName")'/>

    In Report:
    <item field="CName"/>

MTFBWY      

       John

Reply all
Reply to author
Forward
0 new messages