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:
- Create a new file in your Input folder with an ".rmscript" file extension (e.g. "test.rmscript")
 - Right click on the file and click "edit in Report Studio"
 - 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.
 - 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:
- In your Report Template (.docx or .html file), insert a macro: [Script.Execute: fileName="test.rmscript"]
 - Run the Report Job
 - Note that the [Script.Execute: ] macro will appear int he progress screen, along with macros that it inserts into your report.
 - 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
Post a Comment