Report template options are saved in the /Contents/info.plist within a Merlin‘s report template package and shown in the order they are defined. Therefor, should you want to add another option for your custom report:
- You open the info.plist as found in your report template package under /Contents
- Check the dictionaries defined for the key PWReportParameters
- And define your own dict in the position you would like it to be shown
Note: Use existing options as reference on how to define checkboxes, lists, or text entry fields
Some examples:
1. You have created a copy of the existing Next Due Activities report (as explained here) and want to add an option to disable the “Group” column in the outputted table.
Your workflow
- Open the info.plist as found in your report template package under /Contents
- Copy the dict definition for another checkbox option (for example this for withProjectImage)
- And paste
- Edit the strings for key and title in the pasted dict.
<dict>
<key>key</key>
<string>withGroup</string>
<key>title</key>
<string>Group</string>
<key>valueClass</key>
<string>NSNumber</string>
<key>style</key>
<string>bool</string>
<key>defaultValueString</key>
<string>0</string>
</dict>
Note: A defaultValueString of 1 means that this option is on per default. You may enter a 0 if you want this option to be off.
- Save your changes
- Open the Report.xslt from your lproj folder (for this post, we assume you are editing Report.xslt out of /Contents/Resources/English.lproj)
- Locate on the start of the Report.xslt the rows defining the parameter names. You can search for
param name="withProjectImage"
- Copy this line and paste
- Enter withGroup instead of  the pasted withProjectImage:
<xsl:param name=”withGroup”/>
- Locate the row outputting the Group title in the table, it is
<th>Group</th>
- Do a test for the value of $withGroup by 1 and allow it to be shown only then
<xsl:if test="$withGroup = 1"><th>Group</th></xsl:if>
- Locate the row outputting the Group’s value in the table, it is
<td width="18%"><xsl:value-of select="../title"/></td>
- Do a test for the value of $withGroup by 1 and allow it to be shown only then.
<xsl:if test="$withGroup = 1">
<td width="18%"><xsl:value-of select="../title"/></td>
</xsl:if>
Note: There are 2 rows to change. Once the table outputting when <xsl:if test=”$showResource = ” “> and a second time for <xsl:if test=”$showResource != ” “>
- Save your Report.xslt file
- Restart Merlin if it is already running
- Open your project
- Call File > New Report…  and select your thus changed report
- It won’t show the “Group” column per default, but you can enable its display in the options:
2. You have created a copy of the existing Cost Distribution report (as explained here) and want to add an option to disable the “Group” column in the outputted table.
See next blog post for the workflow
______
Related Posts:
Pingback: Merlin – Localize a Merlin report template » MacPM
Pingback: Merlin – Adding an option in a python/wbl report template » MacPM
Pingback: Merlin – adding a property into an existing report » MacPM
Pingback: Merlin – Adding a property into an existing python template » MacPM
Pingback: Merlin – do a bit of magic in reports » MacPM
Pingback: Merlin – do a bit of magic in reports – part III » MacPM
Pingback: MERLIN – DO A BIT OF MAGIC IN REPORTS – PART VI » MacPM
Pingback: Merlin – Do a bit of magic in reports – Part VIII » MacPM
Pingback: Merlin – Do a bit of magic in reports – Part IX » MacPM
Hello Gentlemen, does anybody know about a merlin report builder interface with no manually editing xml file. Any plan for merlin 3 about it ? really missing it
Thanks a lot
Ed
Thanks for your comment Ed.
Current reports concept of Merlin is indeed not that comfortable and rather technical when it comes to customizing. It will certainly be better and easier in the next major update. An ETA is however at this time point not available.
Best regards, Vicky
Pingback: MERLIN – DO A BIT OF MAGIC IN REPORTS – PART XVIII » MacPM
Pingback: Merlin – Do a bit of magic in reports – PART XIIX » MacPM
Pingback: Merlin – Do a bit of magic in reports – PART XX » MacPM
Pingback: Merlin – Do a bit of magic in reports – PART XXI » MacPM
Pingback: Merlin – Do a bit of Magic in Reports – Part XV » MacPM
Pingback: MERLIN – DO A BIT OF MAGIC IN REPORTS – PART XII » MacPM
Pingback: Merlin – Do a bit of magic in Merlin reports – PART XXII » MacPM
Pingback: Merlin – Do a bit of magic in Merlin reports – PART XXIII » MacPM
I do accept as true with all the ideas you have offered on your post. They are really convincing and can definitely work. Nonetheless, the posts are very brief for starters. May just you please lengthen them a little from next time? Thanks for the post.
Pingback: Merlin - Do a little bit of magic in Merlin reports - part XXIV » MacPM
Pingback: Merlin – Do a little bit of magic in Merlin reports – part XXVI » MacPM
Pingback: Merlin – Do a little bit of magic in Merlin reports – part XXVII »
Pingback: Merlin – Localize a Merlin report template »
Pingback: MERLIN – DO A BIT OF MAGIC IN REPORTS – PART XI »
Pingback: Merlin – Do a little bit of magic in Merlin reports – part XXVII | MacPM
Pingback: Merlin – Do a little bit of magic in Merlin reports – part XXVI | MacPM
Pingback: Merlin – Do a bit of Magic in Reports – Part X | MacPM
Pingback: Merlin – Do a bit of magic in reports – Part IX | MacPM
Pingback: MERLIN – DO A BIT OF MAGIC IN REPORTS – PART VI | MacPM
Pingback: Merlin – Do a bit of magic in reports – Part V | MacPM
Pingback: Merlin – Do a bit of magic in Merlin reports – PART XX | MacPM