ReportMagic - Quick Start
- Running your first macro and storing your files
- Creating a report template and running a schedule
- Connecting to your cloud systems (for example, LogicMonitor)
- Viewing LogicMonitor data in ReportMagic
Preparing to run your first macro
The codes that tell ReportMagic what data to insert into a report are called macros. Macros are always surrounded by square brackets, have a colon at the end of their name, and contain a number of parameters. For example, this picture shows a macro which will set a preferred filename for the finished report:Before you start writing these from scratch, it is best to go to Report Studio and start with one of the examples from the Help. Then you can see immediately whether everything has worked or not. First, though, let's set up some folders to store our files.
Creating folders for your files
To create a folder for your files:- Click Files.
- Navigate to an appropriate area.
- Right-click on the blank space in the right-hand pane and from the menu that appears, click New folder.
- Create a folder, called Tutorial Input which will be where your report templates (and any relevant CSV files you might be using) will be stored.
- Create a second folder for output called Tutorial Output. This is where the automatically-generated reports will be saved.
Using Report Studio to...
Run your first macro
Report Studio is an integrated development environment where you can produce ad-hoc reports, and easily check if macros work correctly before you use them in a report. If they don't work well, you will see immediate feedback about why that might be, so you can change them and try again. When you open Report Studio, type in the left pane, output is shown in the right pane, and a Progress pane shows information as you run the macros.
Follow the steps below to create a simple example:
- Click Report Studio.
- In the left hand pane, type the words “The hostname is”.
- From the Help menu, click the Insert Macro button.
- Type the word String.
- Click Insert Example 1 to paste the first example into Report Studio.
- Click the Run button.
The string macro executed and the output is shown on the right hand side. Not a very exciting macro, but let's keep things simple for now.
Create a simple report template
Report Studio is great for designing and testing. But you'll need to have macros saved in html, docx or pptx documents - these are your report templates. The macros in these templates tell ReportMagic what data to use and how to use it, so that the reports you require are produced correctly. Easy ways to get started with templates include:- Typing in Report Studio and saving your work, which we will do in this tutorial
- Downloading then amending one of the available templates from the ReportMagic library
Save a template
Since we're in Report Studio already, let's save what we have as a template. To do this:- In Report Studio, from the File menu, click Save As.
- Navigate to an appropriate folder and click the button to create a new folder within it called "Tutorial Input".
- Type a file name including .docx as the extension.
- Click Save and a message notifies you of success. Click to close the message.
To see where the report template has been saved:
- In the right hand menu, click Files.
- In the left-hand pane, navigate to the folder where you saved the file. The file is shown on the right.
You can change the name of the file, download it, rename it and more by right-clicking on the file.
You can add more files, including images and CSV files to the folder by right-clicking on the blank space in the right hand pane and choosing Upload Files from the menu that appears. - Using that right click context menu, create an additional folder called Tutorial Output.
Creating a Simple Schedule
A Schedule contains information about how, when and what reports will run, such as the folder location where your templates are. Once you are happy with a report template, you should create a Schedule for it, even if you don’t run the Schedule straight away.
To create a Schedule:
- Click Schedules.
- Click Create.
- In the dialog box that appears, type a Name and choose the type as Free.
- Click the icon next to Input Folder and choose the folder where you stored your first report template, Tutorial Input.
- Click the icon next to Output Folder and select your Tutorial Output folder.
- Ensure Error Handling is set to Do Not Stop.
- The only choice for Free reports, is PDF output, so slide to select that, and leaving all the other settings as is click Save.
- The Schedule is saved.
Now let’s run the report by running the Schedule.
Running a Schedule
When you have a Schedule, you can set it to run at a certain time or you can run it immediately. We are going to run it immediately. To do this:
- If you are not already on the Schedules page, click Schedules.
- Find your Schedule in the list and click the Run button next to it.
The Progress page appears and the Schedule runs. - Click the Output button to be taken to the Files area. You will see that an Output subfolder, named with last month’s date, has been created.
- Expand the dated folder and open the PDF to see your finished report.
Congratulations, you have written a macro, saved it as a template, created a Schedule and produced your first report using ReportMagic.
Running one of the provided reports
Now let’s see what a more advanced report looks like by downloading one of the report templates in the library and running it. You will be able to view some statistics on ReportMagic itself. To do this:
- In the Files area, click Library.
- Under ReportMagic, open the Report Schedules folder and download the ReportSchedules report.
- In Microsoft Word, open the file and click the Enable Editing button.
Created for [ReportMagic.ReportProperty:property=TenantName] with ReportMagic on [DateTime:]
The macro name, within square brackets, consists of:
- ReportMagic - indicating the macro group
- ReportProperty - indicating the individual macro, one that will insert a property of the report itself
- TenantName - the property of the macro
- Scroll down to the last page and view a table of macros which, in essence tell ReportMagic that for each Schedule, it should show certain information such as the name, time of last run, and so on. Full information on each macro is available from the Help menu, by clicking Macro Documentation. But for now, let’s run the report.
- Click Files.
- Double-click on the Tutorial Input folder.
- Right-click on the white space of the folder and choose Upload Files.
- Browse to and select the downloaded file, ReportSchedule Report.docx. Click Open to have the file uploaded.
- Click Schedules and find the Schedule you have created.
- Click the Run button.
The Progress Page appears showing the reports in the input folder running and completing. - Click the Output button.
- Double-click to expand the dated folder and open the new PDF to see your finished report.
- Observe the information that has been filled in on the front page, and on the last page.
Congratulations - that's the tutorial done; you’ve used one of the supplied templates and viewed how macros can be used to report on the ReportMagic system itself.
ReportMagic is most valuable when you connect it to your cloud systems, for example, LogicMonitor, ServiceNow and so on. Please read the topic on creating Connections here to start doing this.