Quick StartThe ReportMagic MenuSchedulesBatch JobsReport StudioFilesProfileAdminAccount DetailsMeraki WebHooksGetting StartedAbout ReportMagicRegistering and Logging InSearching ReportMagicConnections and AgentsWriting ReportsStarting Out With Report StudioCreating Report TemplatesRMScriptMacro ShorthandReporting on Different Periods of TimeSetting Macro Parameter DefaultsStoring Input and Output FilesReport VariablesUsing Variable ParametersSpecifying How Graphs LookStep-by-Step LogicMonitor Graph ExamplesStep-by-Step Jira Graph ExamplesSpecifying How Tables LookChanging Fonts and ColorsUsing Macros in PowerPoint TemplatesRestricted MacrosGenerating Reports Using SchedulesUsing HTML Forms in SchedulesSeeing How Reports RanViewing ReportsCached ValuesUsing AggregationsAdvanced Report StudioAPI AccessREST APIREST API - FilesAdvancedRole-Based Access Control (RBAC)SecurityMiscellaneousBadgesCertificationsTips, Tricks and Shortcut KeysMacrosAgentAgent.ConnectionAgent.ExecuteAgent.MonitorMagicNodeListAgent.MonitorMagicNodeMeasurementListAgent.MonitorMagicNodeMeasurementSummaryAgent.MonitorMagicNodePropertyListAgent.MonitorMagicNodeTypeListAgent.PropertyAgent.SqlAnalysisAgent.SqlGraphAgent.SqlListAgent.SqlTableAgent.SqlValueAgent.SqlValuesAgent.WebQueryAlertMagicAlertMagic.MetricsGraphAlertMagic.MetricsListAutoTaskAutoTask.AccountListAutoTask.AccountPropertyAutoTask.ConnectionAutoTask.CountAutoTask.FieldListAutoTask.FieldPropertyAutoTask.ListAutoTask.PropertyAutoTask.SummaryValueAutoTask.TicketListAutoTask.TicketPropertyAzureAzure.ConnectionAzure.LogAnalyticsGraphAzure.LogAnalyticsQueryAzure.LogAnalyticsScalarAzure.LogAnalyticsTableAzure.ResourceGroupListAzure.ResourceListAzure.ResourcePropertiesAzure.SentinelAlertRuleListAzure.SentinelConnectorListAzure.SentinelIncidentListAzure.SentinelThreatIndicatorListAzure.SentinelThreatIndicatorMetricListAzure.SubscriptionListBloggerBlogger.BlogPropertyBlogger.ConnectionBlogger.PageBlogger.PageListBlogger.PagePropertyBlogger.PostBlogger.PostListBlogger.PostPropertyCacheCache.ExpiresCache.GetCache.IsSetCache.SetCache.UnsetCertifyCertify.ConnectionCertify.DepartmentListCertify.DepartmentPropertyCherwellCherwell.BusinessObjectDefinitionListCherwell.BusinessObjectListCherwell.BusinessObjectSchemaCherwell.BusinessObjectSummaryCherwell.ConnectionCiscoCisco.ConnectionCisco.FirmwareVersionPropertyCisco.SecurityAdvisoryListCisco.SerialNumberPropertyCisco.SoftwareSuggestionListCiscoDnaCenterCiscoDnaCenter.ConnectionCiscoDnaCenter.SiteListCiscoDnaCenter.SitePropertyCloudHealthCloudHealth.AssetDetailsCloudHealth.AssetListCloudHealth.AvailableReportDimensionsCloudHealth.AvailableReportOptionsCloudHealth.AvailableReportsListCloudHealth.AwsAccountDetailsCloudHealth.AwsAccountsListCloudHealth.ConnectionCloudHealth.CustomerDetailsCloudHealth.CustomerListCloudHealth.CustomerReportDetailsCloudHealth.CustomerStatementDetailsCloudHealth.OrganisationAccountsListCloudHealth.OrganisationListCloudHealth.QueryConnectWiseManageConnectWiseManage.ConnectionConnectWiseManage.CountConnectWiseManage.DictionaryConnectWiseManage.ListConnectWiseManage.PropertyCoreArrayArray.CountBreakBreakpointCalculateColorCommentContinueConvertDeleteDeleteRowDocumentBookmarkDocumentBreakDocumentInsertSectionDocumentSectionEmailEmailFileEmailReportExecuteForEachFormatTableCellFormatTableRowIfIgnoreIncInsertTableCellImageIsSetLinearRegressionLinkMapObjectRandomRegexRepeatRowSearchAndReplaceSectionSettingsSleepStopStopwatchStringStringIndexSubstringSwitchThrowExceptionUnsetWarningDatabaseDatabase.ConnectionDatabase.GraphDatabase.ListDatabase.TableDatabase.ValueDatabase.ValuesDataMagicDataMagic.SyncDictionaryDictionary.ItemDictionary.KeysDictionary.ValuesDocumentDocument.SetPropertiesFileFile.CopyFile.CopyOutputFilesFile.Csv.CellFile.Csv.RowFile.Csv.RowCountFile.Csv.TableFile.EmbedFile.ExecuteFile.ExistsFile.ImageFile.InsertFile.ListFile.LoadListFile.LoadObjectFile.LoadStringFile.LoadVariablesFile.Xlsx.CellFile.Xlsx.RowFile.Xlsx.RowCountFile.Xlsx.TableFunctionFunction.CallFunction.DefineGoogleGoogle.ConnectionGoogle.TableGraphGraph.AddDataGraph.DeleteDataGraph.RenameDataGraph.UpdateGravatarGravatar.ImageHighlightHighlight.BearerSummaryHighlight.BroadbandSummaryHighlight.CellularSummaryHighlight.ConnectionHighlight.FolderListHighlight.HttpServerPerformanceSummaryHighlight.IcmpTcpUdpPerformanceSummaryHighlight.MosPerformanceSummaryHighlight.PrecisionPerformanceSummaryHighlight.TunnelSummaryHighlight.WatchNodeListHighlight.WirelessAccessPointSummaryHubSpotHubSpot.ListJarrayJarray.TableJiraJira.AttachmentImageJira.AttachmentListJira.AttachmentPropertyJira.ConnectionJira.GraphJira.InsertMarkupJira.IssueAnalysisJira.IssueCommentListJira.IssueCommentPropertyJira.IssueLastCommentPropertyJira.IssueListJira.IssuePropertyJira.IssueResponseTimeJira.LastImageJira.StatusListJira.TableJira.TimeInStateJira.UserListJira.UserPropertyJsonJson.ItemJson.ListKrokiKroki.ImageListList.AddList.AnalysisList.ComplementList.CountList.DequeueList.DuplicatesList.FirstList.GraphList.GroupByList.IndicesOfList.IntersectionList.ItemList.RangeList.SelectList.SelectColumnsList.SortList.SummaryValueList.TableList.UnionList.WhereLogicMonitorLogicMonitor.AccountPropertyLogicMonitor.AlertAnalysisLogicMonitor.AlertCalendarLogicMonitor.AlertCountLogicMonitor.AlertListLogicMonitor.AlertMapLogicMonitor.AlertPropertyLogicMonitor.AlertRuleListLogicMonitor.AlertRulePropertyLogicMonitor.AlertStatusLogicMonitor.AlertTableLogicMonitor.AppliesToFunctionListLogicMonitor.AppliesToFunctionPropertyLogicMonitor.AppliesToListLogicMonitor.AuditEventAnalysisLogicMonitor.BigNumberWidgetValuesLogicMonitor.ClearCacheLogicMonitor.CollectorExecuteLogicMonitor.CollectorGroupListLogicMonitor.CollectorGroupPropertyLogicMonitor.CollectorListLogicMonitor.CollectorPropertyLogicMonitor.CollectorVersionListLogicMonitor.CollectorVersionPropertyLogicMonitor.ConfigCheckListLogicMonitor.ConfigCheckPropertyLogicMonitor.ConfigSourceGroupListLogicMonitor.ConfigSourceListLogicMonitor.ConfigSourcePropertyLogicMonitor.ConfigSourceXmlLogicMonitor.ConnectionLogicMonitor.ConnectionApiTokenLogicMonitor.ConvertToLiveWidgetLogicMonitor.DashboardLogicMonitor.DashboardGroupListLogicMonitor.DashboardGroupPropertyLogicMonitor.DashboardListLogicMonitor.DashboardPropertyLogicMonitor.DashboardWidgetListLogicMonitor.DatamartSyncLogicMonitor.DataPointListLogicMonitor.DataPointPropertyLogicMonitor.DataSourceGraphListLogicMonitor.DataSourceGraphPropertyLogicMonitor.DataSourceGroupListLogicMonitor.DataSourceListLogicMonitor.DataSourcePropertyLogicMonitor.DataSourceXmlLogicMonitor.DeviceConfigSourceFileLogicMonitor.DeviceConfigSourceInstanceListLogicMonitor.DeviceConfigSourceListLogicMonitor.DeviceConfigSourcePropertyLogicMonitor.DeviceCountLogicMonitor.DeviceDataSourceListLogicMonitor.DeviceDataSourcePropertyLogicMonitor.DeviceGroupListLogicMonitor.DeviceGroupPropertyLogicMonitor.DeviceListLogicMonitor.DevicePropertyLogicMonitor.DeviceSlaWidgetPropertyLogicMonitor.DeviceTableLogicMonitor.EscalationChainDestinationListLogicMonitor.EscalationChainDestinationPropertyLogicMonitor.EscalationChainListLogicMonitor.EscalationChainPropertyLogicMonitor.EventSourceFilterListLogicMonitor.EventSourceFilterPropertyLogicMonitor.EventSourceGroupListLogicMonitor.EventSourceListLogicMonitor.EventSourcePropertyLogicMonitor.EventSourceXmlLogicMonitor.FinancialInformationLogicMonitor.ForecastLogicMonitor.GraphLogicMonitor.HistoricSdtListLogicMonitor.ImageLogicMonitor.InstanceAnalysisLogicMonitor.InstanceCountLogicMonitor.InstanceDetailsTableLogicMonitor.InstanceGroupCountLogicMonitor.InstanceGroupListLogicMonitor.InstanceListLogicMonitor.InstancePropertyLogicMonitor.IntegrationListLogicMonitor.IntegrationPropertyLogicMonitor.JobMonitorListLogicMonitor.JobMonitorPropertyLogicMonitor.LastMeasurementLogicMonitor.LogAnalysisLogicMonitor.LogicModuleMetadataPropertyLogicMonitor.LogicModuleUpdateListLogicMonitor.LogicModuleUpdatePropertyLogicMonitor.LogItemListLogicMonitor.NetscanGroupListLogicMonitor.NetscanGroupPropertyLogicMonitor.NetscanListLogicMonitor.NetscanPropertyLogicMonitor.NewUserMessagePropertyLogicMonitor.PaymentInformationLogicMonitor.PercentageAvailabilityLogicMonitor.PortalVersionLogicMonitor.PropertySourceGroupListLogicMonitor.PropertySourceJsonLogicMonitor.PropertySourceListLogicMonitor.PropertySourcePropertyLogicMonitor.QueryLogicMonitor.RecipientGroupListLogicMonitor.RecipientGroupPropertyLogicMonitor.RecycleBinItemListLogicMonitor.RecycleBinItemPropertyLogicMonitor.ReportGroupListLogicMonitor.ReportGroupPropertyLogicMonitor.ReportListLogicMonitor.ReportPropertyLogicMonitor.ResourceAnalysisLogicMonitor.ResourceGroupAnalysisLogicMonitor.RoleListLogicMonitor.RolePropertyLogicMonitor.SdtListLogicMonitor.SdtPercentageLogicMonitor.SdtPropertyLogicMonitor.SingleSignOnPropertyLogicMonitor.SlaWidgetValuesLogicMonitor.SnmpSysOidMapListLogicMonitor.SnmpSysOidMapPropertyLogicMonitor.SummaryValueLogicMonitor.SummaryValueListLogicMonitor.ThresholdLogicMonitor.TrafficTableLogicMonitor.UnmonitoredDeviceListLogicMonitor.UnmonitoredDevicePropertyLogicMonitor.UserApiTokenListLogicMonitor.UserApiTokenPropertyLogicMonitor.UserListLogicMonitor.UserPropertyLogicMonitor.WebsiteCheckpointDataListLogicMonitor.WebsiteCountLogicMonitor.WebsiteGroupAnalysisLogicMonitor.WebsiteGroupCountLogicMonitor.WebsiteGroupListLogicMonitor.WebsiteGroupPropertyLogicMonitor.WebsiteListLogicMonitor.WebsitePropertyLogicMonitor.WidgetStatusMagicSuiteMagicSuite.SubscriptionListMerakiMeraki.CameraImageMeraki.ConfigurationChangeListMeraki.ConnectionMeraki.DevicePropertyMeraki.DeviceUplinkPropertyMeraki.EndOfLifeMeraki.NetworkClientListMeraki.NetworkDeviceListMeraki.NetworkEventListMeraki.NetworkListMeraki.NetworkPropertyMeraki.NetworkSwitchPortsListMeraki.NetworkSwitchStackListMeraki.OrganizationDeviceLicenseListMeraki.OrganizationDeviceLicensePropertyMeraki.OrganizationDeviceListMeraki.OrganizationDeviceListStatusPropertyMeraki.OrganizationInventoryListMeraki.OrganizationLicenseStatePropertyMeraki.OrganizationListMeraki.OrganizationPropertyMeraki.OrganizationUplinkUsageMeraki.WirelessNetworkClientConnectionStatsPropertyMeraki.WirelessNetworkClientLatencyListMeraki.WirelessNetworkClientsConnectionStatsListMeraki.WirelessNetworkClientsLatencyListMeraki.WirelessNetworkConnectionStatsPropertyMeraki.WirelessNetworkDeviceConnectionStatsPropertyMeraki.WirelessNetworkDeviceLatencyListMeraki.WirelessNetworkDevicesConnectionStatsListMeraki.WirelessNetworkDevicesLatencyListMeraki.WirelessNetworkLatencyListMicrosoftDataverseMicrosoftDataverse.ConnectionMicrosoftDataverse.CountMicrosoftDataverse.EntityDefinitionsListMicrosoftDataverse.EntityListMicrosoftDataverse.EntityPropertyListMicrosoftDataverse.ListMicrosoftDataverse.PropertyMicrosoftGraphMicrosoftGraph.ConnectionMicrosoftGraph.MicrosoftDataverseConnectionMicrosoftGraph.QueryObjectObject.ArrayCountObject.PropertyObject.TypeObject.UnpackObject.UnpackVariablesOpenAiOpenAi.AnswerOpenAi.CompleteOpenAi.ConnectionOpenAi.ImageQuickBooksQuickBooks.ConnectionQuickBooks.PropertyReportMagicReportMagic.ApplyBrandReportMagic.BadgeListReportMagic.ConnectionListReportMagic.ConnectionPropertyReportMagic.ConnectionStatusPropertyReportMagic.FeedbackListReportMagic.FeedbackPropertyReportMagic.MacroGroupListReportMagic.MacroHelpReportMagic.MacroListReportMagic.ReportBatchJobCountReportMagic.ReportBatchJobListReportMagic.ReportBatchJobPropertyReportMagic.ReportConnectionSummaryReportMagic.ReportJobCountReportMagic.ReportJobListReportMagic.ReportJobPropertyReportMagic.ReportMacroCountReportMagic.ReportPropertyReportMagic.ReportScheduleCountReportMagic.ReportScheduleListReportMagic.ReportSchedulePropertyReportMagic.SetReportPropertyReportMagic.SystemPropertyReportMagic.TenantImageReportMagic.TopicHelpReportMagic.VersionSalesforceSalesforce.ConnectionSalesforce.ListSalesforce.PropertyServiceNowServiceNow.ConnectionServiceNow.CountServiceNow.CreateServiceNow.DeleteServiceNow.DictionaryServiceNow.ListServiceNow.PropertyServiceNow.UpdateShapeShape.AddShape.CloneShape.DeleteShape.FormatShape.HideShape.SetPropertyShape.SetTextSlackSlack.ConnectionSlack.MessageSlideSlide.DeleteSlide.DeleteSectionSlide.LinkSlide.MoveToSlide.RepeatSmtpSmtp.ConnectionSnmpSnmp.EnterprisePropertySolarWindsSolarWinds.ConnectionSolarWinds.SqlListSolarWinds.SqlTableSqlSql.AnalysisTableTable.ColumnCountTable.DeleteTable.FormatTable.GraphTable.MergeCellsTable.RowCountTable.SaveTable.SortTable.WorldMapTimeCalendarCronHumanReadableCronRunDateDateRangeDateTimeDateTime.IsInWorkHoursDateTime.WorkHoursDurationTimeSpanTogglToggl.ClientListToggl.ClientPropertyToggl.ConnectionToggl.ProjectListToggl.ProjectPropertyToggl.ProjectReportPropertyToggl.TimeEntryListToggl.TimeEntryPropertyToggl.UserListToggl.UserPropertyToggl.WorkspaceListToggl.WorkspacePropertyTwilioTwilio.ConnectionTwilio.SmsUkParliamentUkParliament.PetitionCountUkParliament.PetitionListUkParliament.PetitionPropertyVariableVariable.ImageVariable.ListVariable.PropertyWebWeb.ConnectionWeb.HtmlWeb.ImageWeb.QueryWeb.ScreenshotWeb.TableWeb.TextXlsxXlsx.AddAnalysisXlsx.EmbedZendeskZendesk.ConnectionZendesk.ListZendesk.PropertyZoho.DeskZoho.Desk.ZohoListZoho.Desk.ZohoProperty

Generating and Scheduling Reports

You can generate reports that:

  • Run immediately when you click a button
  • Are run at particular times

Generate Reports Immediately

To generate reports immediately:

  1. Set up a Schedule. This will point to the folder containing your input document(s) and specify what type of output documents you want produced
  2. Click the Run Now button

Generate Reports at a Specific Time

To generate reports at a particular time:

  1. Set up a Schedule. This will point to the folder containing your input document(s) and specify what type of output documents you want produced
  2. In your Schedule, also specify the time you want the reports generated
  3. Sit back and wait for the reports to be produced at that time

Tip: include the [Email:] macro in your report so it is emailed to you at the specified time.

Creating a Schedule

To create a Schedule:

  1. Create and save your report templates, then close them, that is, that they are no longer open in Microsoft Word.
  2. If you have not already done so, set up:
    • An input folder for your report templates (and any other relevant files you might be using, for example rmscript or csv files)
    • An output folder where the automatically-generated reports will be saved. These folders must exist prior to running your reports and will not be automatically created
  3. Copy your report templates and other relevant files to the input folder
  4. In ReportMagic, click Schedules.
  5. Click the Create button (or edit an existing Schedule).
  6. In the dialog box that appears, enter information as follows:
Name Enter a name for your Schedule
Description Enter an optional description
Is Admin Locked When selected by an administrator, this checkbox indicates that only Admins can edit, or clone this Schedule. 
Schedules containing restricted macros can ONLY be run when the Is Admin Locked checkbox is selected. However, before selecting it, it is vital to ensure Role Based Access Control is set as required to prevent regular users from making unwanted changes. 
Type Choose Free or Production. Free Reports limit you to PDF output and may contain adverts. Production Reports are rendered advert-free and are available in PDF, DOCX, PPTX, XSLX and HTML as required. A fixed number of Production reports are included each month as per your service agreement with further reports incurring an additional charge. For more on XLSX output, see the end of this topic.
Batch Variables See "Batch Variables", below.
Input Folder Select the folder location where you have stored, or will be storing, the report templates. ReportMagic loads into memory everything in this location, including files in subfolders. Tip: Store unnecessary files in a subfolder named Archive for ReportMagic to ignore them and your Schedule to run faster.
Output Folder Select the folder location where the automatically generated reports will be saved, on the server.
Form HTML File (Optional) If you would like a form to be presented to the user when running the report, choose a single pre-existing HTML file. For more details, see below. Note that schedules containing forms can only be run with the Run Now button (and cannot be scheduled).
Store substituted macros This setting is enabled by default. If you have sensitive information, clearing the checkbox means that data collected by a macro is not stored in our database. However, this means you will see "redacted" in the Progress Page rather than the actual values that were substituted for variables, which will make it more difficult to debug a schedule.
Store output This setting is enabled by default. If you have sensitive information, clearing the checkbox means that the output data collected by a macro is not stored in our database.
Cleanup

Here you specify when output is deleted. Choose from:

  • Use Tenant Default - this will use the overall setting used by your company for output folder clean-up
  • Days  - this will, AFTER a Schedule has run, look in the subfolders of the output folder and delete files and folders older than the number of days you specify. This is an easy way to clear out old output files.
    If the input and output folder are different, all the files in subfolders excluding the identical input/output folder older than N days are removed. If the input and output folders are the same (with output going to monthly subfolders), ONLY files and folders inside the monthly subfolders (for example, 2021-11) are deleted. This means that any archive folders or other content not in the monthly subfolders will be left untouched.
  • Do Not CleanUp

Note that if you are not using Monthly Subfolders, your identically named output will get overwritten each time.

DOCX, PPTX, PDF, HTML and XLSX

Select the output type(s) required.

Note: free reports are limited to PDF output. Also that:

  • You can only get Powerpoint output from a PPTX input template
  • A PPTX input template can ONLY produce PPTX output (so for example, you can't have a PDF from it)
  • If there are DOCX and PPTX input templates in the same folder, the DOCX will be converted to the other selected outputs (PDF, DOCX, XLS, HTML)
  • In actuality, any PPTX input template will always produce PPTX output regardless - the PPTX output checkbox is for UI consistency.
Use monthly subfolder This option will save output files (PDFs, Word documents, etc) to an automatically-created subfolder whose name shows a date and month in the format 2023-06.
Hide Legacy indicators Whether to suppress warning (orange) macros in the UI (Progress Page). When enabled, this setting will show them as green, but the warning count will still be accurate.
Use Normal Mode The default mode for Schedules is 'legacy', whereby variables are typically stored as strings in various formats (e.g. multiple items may be delimited by semi-colons or other characters). You can force 'normal' mode by selecting this option, in which case the Schedule will by set to normal mode (variables are typically stored as objects, e.g. an int32, or JObject), unless overridden on a per-macro basis.
Error Handling Choose the behaviour you require if an error is found, and who to notify by email. You can enter multiple addresses separated by a comma.
Run At Set Time and Cron Schedule

Check this for automatic scheduling, then type the expression which corresponds to the time when you want the schedule to run.

A cron string, which comprises 6 or 7 fields separated by white space, is used to specify the time at which a report runs. For example, the string "0 0 12 ? * WED" means "every Wednesday at 12:00 pm".

Cron is a well-developed specification with powerful and proven scheduling capabilities but writing your own cron strings can seem daunting. ReportMagic uses Quartz for scheduling and your cron string must meet the Quartz cron string specification. You can find useful information on these websites:

Your cron should include seconds - not all cron formats on other websites do.


7. 
Click Save. Now you can:

  • Immediately generate a report
  • Wait until the specified time, then view the automatically-generated report

Batch Variables

Use batch variables when you want to run multiple Report Jobs in the Report Batch Job. For example, if sending the same Performance Report to three different customers, you might have batch variables that are three customer names.

Direct Values

In this method, type values here in a semicolon-separated list. A Report Job will be run with the variable "BatchVariable" set to each item in the list. For example:

  • Customer A;Customer B;Customer C

If you want to pass more information in using this method, do this with some structure to each value. For example:

  • Customer A^123;Customer B^456;Customer C^789

XLSX Values

Using this method, multiple Report Jobs can be added to the Report Batch Job, with variables set based on column headings. In the Batch Variable field, type:

  • file:filename.xlsx

...where the named XLSX file is in the specified input folder for the Schedule, and the XLSX file contents is a single table.

By default, every row will result in a Report Job. However, if you include the special column "Condition" in your table, this will be evaluated as an NCalc to determine whether to use that row in a Report Job. Be sure that the "Condition" cells are formatted as text.

Note: to set data as tabular in Microsoft Excel, select the data and from the toolbar, click "Format as Table".

If you wish to specify the worksheet name, you can use the following format:

  • file:filename.xlsx:worksheetName=<WorksheetName>

Running Schedules and viewing the results

Once a report template and a schedule are both set up, you can immediately produce then view a report as follows:

  1. Click Schedules
  2. Next to the relevant Schedule, click the Run button either at the top or in line with the Schedule. The Progress page appears showing the report(s) running and completing.
  3. Click the Output Folder button
  4. Navigate to the the correct folder and open the appropriate file to view your finished report

To view an automatically-generated report:

  1. Wait until the scheduled time has passed
  2. Click Files
  3. Navigate to the output folder specified in the schedule and open the appropriate file to view your finished report.

In both these cases, you can also view information about report generation, such as whether and how errors occurred. System administrators can also view detailed system logs.

Using Forms in Schedules

You can use forms in a schedule, inside HTML files. Values of input elements, such as HTML select elements, are converted to JSON and attached to the Batch Variable (without overriding any other existing batch variables). You can then use JSON macros in ReportMagic to extract the values from your report.

Remember that Schedules that use forms can only be run with the Run button (and cannot be scheduled).

About the HTML File

  • The HTML file may contain any standard HTML (including CSS and scripts)
  • The HTML file must only contain one <form></form> element
  • The HTML file must be valid
  • All inputs must be named or they will not be included
  • Multi-select inputs (i.e. drop-downs where you want to allow multiple selections) must have the 'multiple' attribute included
    • In the report variables, these will be represented as a JArray (in normal mode) or a semi-colon separated string (in legacy mode)
  • All button elements will be automatically disabled, except buttons where the type is 'submit' or 'reset'
  • You do not need to include a submit button in your form as Report Magic will add one, if not already present

Here is an example form, which must be saved in a .html file:

<form>
    <p>This schedule has form element inside a .html file.</p>
    <p>The HTML file can be chosen in the add/edit dialog on the Schedules page, in the 'Form HTML File' input.</p>
    <input type="text" name="textinput1" value="val1"></input>
    <input type="text" name="textinput2" value="val2"></input>
    <input type="text" name="textinput3" value="val3"></input>
    <p>This one has no name, and so will not be included:</p>
    <input type="textinput4"></input>
    <select name="selectinput1">
    	<option value="1">1</option>
    	<option value="2">2</option>
    	<option selected value="3">3</option>
    </select>
    <select name="multiselect" multiple>
    	<option value="1">1</option>
    	<option value="2">2</option>
    	<option selected value="3">3</option>
    </select>
    <p>This button will be disabled:</p>
    <button>Click me</button>
    <p>This button will NOT be disabled:</p>
    <button type="reset">Reset form</button>
</form>

Using Form Variables in Reports

For form variables that have been generated by non multi-select inputs, you simply reference the variables using standard macros, e.g. this example prints out the values of the 3 standard text inputs:

[String:value={textinput1}]
[String:value={textinput2}]
[String:value={textinput3}]

In the HTML, which contains 3 inputs named 'textinput1', 'textinput2', 'textinput3', these become available to use in your report templates as shown above. You may use any macro that can take a text variable.

For the multi-select input type (named 'multiselect' in the previous examples), in legacy mode, simply use the standard List.xxx macros to manipulate the values.

For multi-selects in 'normal' mode (i.e. where you have checked 'Force normal mode' on a Schedule), these will be represented as a JArray. There are various macros that you can use to manipulate a JArray, such as to iterate over the values and perform various actions. The variable will be called the same name as you have set in the 'name' attribute on the select element.

Here are some example macros (for the multi-select called 'multiselect' in the previous example) that demonstrate how you can use the values from the JArray:

// Get the first item from the JArray variable called 'multiselect', output as a list
[Json.List: jArray=`{=multiselect}`, jsonPath="$.[0]", storeAs=FirstItemAsList]

// Get all the items from the JArray variable, output as a list
[Json.List: jArray=`{=multiselect}`, jsonPath="$.[*]", storeAs=AllItems]

// Get a count of the items in the JArray variable
[Array.Count:value=`{multiselect}`]

// Get the first item in the JArray variable, output as a single item (i.e. not a list)
[Object.Property:jArray=`{multiselect}`, jsonPath="$.[0]", storeAs=FirstItem]

// Iterate over EACH item in the JArray variable, and then just print out the value
[ForEach:values={multiselect}, storeAs=Iterator]
	[String:value={Iterator}]
[EndForEach:]

About Spreadsheet Output

If you have selected to have XLSX output, this can contain automatically-generated tables, macros that produce tabular data or data from any macro followed by a [Table.Save:] macro.

Note that:

  • An XLSX file will be produced with one worksheet for relevant macros like [LogicMonitor.Graph:] or [File.Table:] in your report, and each worksheet containing a single table of data
  • Automatically generated tables (for example [List.Table:] will autosave to sheets in the XLSX file if the macro parameter writeToSpreadsheet=true (default behaviour)
  • For Graph macros, all datapoints are automatically saved to a sheet if the macro parameter writeToSpreadsheet=true (default behaviour)
  • As well as using these "automatically generated" tables, you can also save manually generated tables to XLSX, by adding a [Table.Save:] macro after each table. Using the parameter saveAsExcelTable=true will save the table in Excel Table format, but you cannot save in this format if the table contains merged cells - no two headings can have the same value. Use the parameter saveAsExcelTable=false if merged cells are present, but this will NOT save in true Excel table format.
  • To stop any particular macro appearing in a spreadsheet, use the parameter writeToSpreadsheet=false in the individual macro.
  • To stop all macros of a specific type being shown in a spreadsheet, use a [Settings:] macro with writeToSpreadsheet=false for a particular type of macro, for example:

[Settings:LogicMonitor.Graph.writeToSpreadsheet=false]

Worksheets are named automatically. If more than one macro specifies the same tabName, a sheet index is appended to each in the form "<Macrotype> <index>" to differentiate each sheet.

You can also specify your own worksheet names by using the parameter worksheetName in macros. For example:

[LogicMonitor.Graph:writeToSpreadsheet=true,worksheetName=Acme Summary]
An unhandled error has occurred. Reload 🗙