Vicky Stamatopoulou on 3. August 2011
We have explained how to add options in your Merlin report templates and control the content of the outputted data. In our examples we define an option to be able to disable a known property, but how to proceed if you want to add the values of a property in your report and don’t know its actual name? This post will try to give some tips on this. For reasons of simplicity we differentiate between XSTL report templates, and templates based on python / wbl:
1. Insert a property into an existing XSLT report template.
2. Insert a property into an existing python / wbl report template
1. Insert a property into an existing XSLT report
Let’s suppose, you have a copy of the existing “Next Due Activities” report (as explained here) and want to add an option to enable the “Notes” column in the outputted table.
Your workflow
param name="withNotes"
<xsl:if test="$withNotes = 1"><th>Notes</th></xsl:if>

You will see it within the following tags and placed in an <Activity> dictionary:
<description>hello</description>
So now you know: To get the Notes value you need to ask the value of description when iterating the activities.
<xsl:if test="$withNotes = 1">
<td width="18%"><xsl:value-of select="description"/></td>
</xsl:if>
Note: When asking the properties of the current iteration you ask directly its properties (tags). If you need to ask a property of a dictionary in a higher level, for example of the group containing the task, you ask ../description. If you need to ask the contents of a deeper element of the current task, you can call ./description
2. Insert a property into an existing python / wbl report template
Let’s suppose you have created a copy of the existing Classic Report (similar to what we have explained here) which is a python/wbl report template and want to add an option to enable the display of some additional columns in the outputted table.
See next post
______
Related Posts:
RSS feed for comments on this post. TrackBack URL
[...] Please see next posts [...]
[...] 1. Insert a property into an existing XSLT report template. 2. Insert a property into an existing python / wbl report template [...]
[...] How to add a property into an existing xslt report [...]
[...] How to add a property into an existing xslt report [...]
[...] How to add a property into an existing xslt report [...]
[...] How to add a property into an existing xslt report [...]
[...] How to add a property into an existing xslt report [...]
[...] How to add a property into an existing xslt report [...]
[...] How to add a property into an existing xslt report [...]
[...] How to add a property into an existing xslt report [...]
[...] How to add a property into an existing xslt report [...]