ReportMagic 2.17

Introducing... RM Scripts!

With the released of ReportMagic 2.17, it is now possible to move many of the hard-to-read macros out of your Report Template (.docx or .html) document and into one or more "RM Script" files.

We hope that this new feature provides a much better development experience for power developers.

Script development

To develop a new RM Script:
  1. Create a new file in your Input folder with an ".rmscript" file extension (e.g. "test.rmscript")
  2. Right click on the file and click "edit in Report Studio"
  3. Develop the script:
    • Enter macros, one or more per line
    • You can add any whitespace, including tabs, spaces and newline characters, these are all stripped out before execution
    • You can add any other characters between the macros - these are also stripped out when executing.
  4. To test, press the play button.  Note that there is no output, but the variables in the variables are updated.

Script usage

To use the RM Script:
  1. In your Report Template (.docx or .html file), insert a macro: [Script.Execute: fileName="test.rmscript"]
  2. Run the Report Job
  3. Note that the [Script.Execute: ] macro will appear int he progress screen, along with macros that it inserts into your report.
  4. It's as if you had inlined all those macros!

Standalone scripts

Normally, .rmscript files in the input folder are assumed to be modules for use within a Report Template.  However, on occasion you may wish to ONLY run a standalone .rmscript file without a parent Report Template.  Any script with a .run.rmscript extension will be executed as a Report Template.  For example:
  • standalone.run.rmscript

Comments