Tips, Tricks and Shortcut Keys
ReportMagic Shortcut Keys
Action | Shortcut Key |
---|---|
Report Studio File New | Ctrl + Alt + N |
Report Studio File Open | Ctrl + O |
Report Studio File Save | Ctrl + S |
Report Studio File Save As | Ctrl + Shift + S |
Report Studio Run | Ctrl + ] |
Report Studio Stop | Ctrl + Alt + ] |
Report Studio Insert Macro | Ctrl + M |
Report Studio Toggle Modes (Code / Rich Text) | Ctrl + Alt + T |
Report Studio Toggle Modes (Normal / Legacy) | Ctrl + Alt + M |
Help | F1 |
Opening Feedback | Ctrl + Alt + F |
Search Everything | Ctrl + Alt + S |
Finding IDs to use in ReportMagic Macros
To find the ID of the batch and individual report jobs:
- On the Schedules page, click the appropriate Schedule then click the Report Jobs button
- Click the required line then click the View Results button. The URL of this page contains the IDs of the batch job (shown in this example as 32342) and report job (shown here as 71248): https://docs.magicsuite.net/schedules/6621/batchjobs/32342/reportjobs/71248/macroresults
- Use these ID in your macros, for example:
[ReportMagic.ReportJobProperty:id=70358, property=MacroErrorCount] [ReportMagic.ReportBatchJobProperty: id=54832, property=InputFileTransferDurationMs]
What's the Difference between [File.Embed:] and [Xlsx.Embed:] macros?
As long as there is an appropriate Excel or PowerPoint file in the Input folder structure, ReportMagic will embed that file into the output Word document, at the location where the [File.Embed:]
macro was encountered.
Conversely, when XLSX output has been enabled on the Schedule, the [Xlsx.Embed:]
macro runs right at the end once everything has completed - at this moment ReportMagi embeds any XLSX file generated by various macros in the right place in the document.
The [Xlsx.Embed:]
macro can be used in Word and PowerPoint input documents, wheres the [File.Embed:]
macro can only be used in Word.
Hiding a Section of a Report
If you have part of a report whose macros are written but you don't want to process them in the document, use [Ignore: hidden=true]
followed by the content, followed by [EndIgnore:]
.
Columns in Tables
Click in the first column and choose Table Properties. On the Columns tab, choose a preferred width for the first column as a percentage of the whole table, e.g. 10%. Click Next Column and choose a percentage preferred width and so on until you get to the last column. With the last column, clear the the Preferred Width box and Word will uses the leftover percent for that column. The benefit of doing this is that if you add a column later, Word will retains all your column 1,2,3 etc settings so you don't have to redo them.
Normal and Legacy Modes
Most macros that output text have a 'mode' parameter which determines how values generated by the various macros are stored as 'variables'.
In legacy mode (the default for Schedules), the output variable created is a string, and may be formatted.
In normal mode, the output variable is stored as a strongly-typed object, e.g. Int32 (whole number), JArray, JObject, list, boolean (true / false), rather than a formatted string. The benefit of this is that it makes it much easier to feed the output from one macro into the input of another, rather than having to rely on string manipulation such as splitting strings by a delimiter characater.
Report Studio defaults to normal mode - you can change this using the Mode button, or override it individually using mode=legacy
or mode=normal
in the parameters of each macro.
In each Schedule, you can select "Force normal mode" to have its macros default to normal mode. Again, you can override using the mode parameter for an individual macro. For all existing reports written in legacy mode, and for new reports that have not been written with mode=normal in mind, do not select "Force normal mode" - reports will continue to run using legacy mode, and this may produce some warnings, which you can choose to color green on the Progress page by selecting the Suppress Warnings checkbox on a Schedule.
Note: it is highly recommend to use Normal Mode.