Merlin – Do a bit of magic in reports – Part IV

Those of you who have checked our new post series about “Merlin report templates” know by now…

Now let’s do some magic with the reports.


What if you want to report planned, actual and planned vs actual work per phase in a chart?

You may download and use a report template we just created. Here some output samples:

Continue reading

Merlin – Do a bit of magic in reports – part III

Those of you who have checked our new post series about “Merlin report templates” know by now…

Now let’s do some magic with the reports.

 


What if you want to list overdue tasks along with the next activities, in “Next Due Activities” report?

The ‘Next Due Activities’ report lists not yet completed activities ending today or within the time period defined in the report’s options. This is done by a ‘select’ in the Report.xslt file:

<xsl:for-each select="(//Activity | //Project) [not(Activity) and xs:dateTime(expectedEndDate) &lt;= xs:dateTime($maxDate) and xs:dateTime(expectedEndDate) &gt;= $now and actualCompletion &lt; 1.0]">

If you would like to list over due tasks as well you would need to modify the select not to check if the expected End Date is greater than the current time point… thus: Continue reading

Merlin – Do a bit of magic in reports – part II

Those of you who have checked our new post series about “Merlin report templates” know by now…

Now let’s do some magic with the reports.

 


What if you want to be able to define the size of the project image over the options?

In the standard Merlin report templates, you have the option of enabling the “project image”. Should you choose to output the project image, Merlin checks in the “Misc” tab of the project settings whether you have defined such a file and renders it then into the report page in original size.

In case you have a much too large project image which you definitely need on your report, you would have to scale down the original picture  and re-drop it in the project settings dialogue.

To avoid re-scaling, or to be able to do reports for different clients and projects but in a standard way, you may insert an option in the report template and re-size your project images accordingly.

Your workflow

  • You define a new dict in the info.plist as…
<dict>
 <key>key</key>
 <string>projectImageScale</string>
 <key>title</key>
 <string>Project Image Scale</string>
 <key>valueClass</key>
 <key>possibleValues</key> Continue reading 

Merlin – Do a bit of magic in reports

Those of you who have checked our new post series about “Merlin report templates” know by now…

Now let’s do some magic with the reports.

  • What if you want to map a status or flag information to a graphic file?
  • What if you want to be able to define the size of the project image over the options?

What if you want to map a status or flag information to a graphic file?

If your report is an xslt report, just proceed as shown in the “Next due Activities” report for the ‘Status’ and ‘MS’ column.

That means, just do a test for the value you want to check and add an image html tag accordingly:

<xsl:if test="flagStatus = 'red'">
   <img src="rsc/red.png" />
</xsl:if>

Continue reading

Merlin – Adding a property into an existing python template

In our last post in this series, we have shown how to enter a new property in a report and how to proceed if not knowing its exact property name. The method shown there applies for XSTL reports. Now we can show a method for python / wbl reports.

1. Insert a property into an existing XSLT report template.
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. For example: “In project since” for the Resources, or “Category” in Issues.

Your workflow

If you want to have it optional, you add new options in the info.plist and insert them in your python class (as explained here)

1. Example – Resources

  • You open the  wbl file of your report package (as found under /Contents/Resources/)
  • Locate the rows outputting the table header for Resources and copy the row with the title header
  • Insert a new row for your  “In project since” and change it  as follows:
    <th><wbl:MERClassicReportColumnHeader title="In project since" key="title" sortDescriptors=resourcesSortDescriptors /></th>
  • Now go in the repetition area and copy one of the outputing rows for example the one for the title
  • Paste in the right position (in the same order as your new header was entered)
  • Replace the  ‘title’ by ‘description’: Continue reading