Merlin – adding a property into an existing report

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

  • You add a new option with the name withNotes as explained here in the info.plist
  • Edit the Report.xslt in your language folder and define
    param name="withNotes"
  • You enter in the table header area the display of the “Notes” header depending on the value of the $withNotes:
<xsl:if test="$withNotes = 1"><th>Notes</th></xsl:if>
  • Open your project in Merlin and call your report: File > New Report… > <select your own Next Due Activities report> and see which rows get outputted.
  • To find what to enter in the table iteration and get the value of the “Notes” column, Continue reading
  • Merlin – Adding an option in a python/wbl report template

    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 XSLT report  and want to add an option.

    Your workflow

    Proceed as explained here

    2. You have created (as explained here) a copy of the existing Cost Distribution report which is a python/wbl report template and want to add an option to disable the “Base Cost” 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. Continue reading

    Merlin – Adding an option in a report template

    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. Continue reading

    Merlin – Further tips for localizing an XSLT report template

    In our last post, we’ve described how to localize the static texts in outputted XSLT reports. You need to open the Report.xslt file placed in the appropriate language lproj folder.

    1. What if, your lproj folder is not existing in the report template’s package?
    2. What if the appropriate language folder  does not contain an XSLT file just like the other lproj folders do?

    1.Your lproj folder is not existing in the report template’s package

    Merlin for Mac OS X contains localization files for the following 3 languages; English, French and German. That means, it can only run in one of those 3 available languages. If your Finder runs for example in Dutch and “Français” is set as second language in the order…

    Merlin will start in French. In this case, when editing reports for *your* language you should edit the French.lproj folder. Continue reading

    Merlin – Localize a Merlin report template

    You are using Merlin in another language than the available 3; English, French or German? You want to localize an existing Merlin report so it shows the entries in your own language? Great, this is the place to find out how to do so.

    Localizing report options:

    • First you create your own report template based on the report template Merlin already offers (as explained here)
    • Now you check the language your Merlin runs. Is it English, German or French?
    • Open the according language folder as found under /Contents/Resources (that means, if your Finder is for example Dutch but your Merlin runs in English you open the English.lproj, if Merlin runs in French, you open French.lproj)
    • Open the Localizable.strings in a text editor (BBEdit, TextWrangler, etc…) 
      Continue reading