Example B. Sorting Reports by Name
Consider the following scenario: you want to schedule a weekly delivery for a set of reports. After the reports are created, you want to save each report to a separate folder with the report name.
To sort reports into folders by report name, you can take the following steps:
- Create a folder that will group a set of necessary reports.
- Save reports with the necessary parameters into the folder.
- Create a script that will sort the generated reports.
- Set the necessary schedule for the folder and specify the post-delivery script.
Create a report folder as described in Creating Folders. The folder will be used to group a set of reports that you want to create on a scheduled basis.
Save reports with the necessary parameters as described in section Saving Reports.
<TargetDirectory>\reporting-task-for-folder-<FolderName><ID>\
The sample script must perform the following operations:
C:\reports\reporting-task-for-folder-<FolderName><ID>\
C:\share\myreports\%ReportName%\
To create a folder with the report name, the script will use the %ReportName% parameter.
An example of the script is provided below:
::Changing directory to the target report location |
Save the script as a Windows batch file on the machine where Veeam ONE Server is installed.
To follow this example, save the script with the postdelivery.bat name to the C:\reports\ directory.
Step 4. Configure Scheduling Settings
Configure scheduling settings for the saved report as follows:
- Open Veeam ONE Reporter.
- Open the Workspace section.
- Select the folder that contains the necessary set of reports.
- At the top of the reports list, click Schedule Folder.
- In the Scheduling Folder Administration window, click Add to create a new schedule.
- In the Scheduling window, configure automatic delivery settings as follows:
- Click the Recipient link.
- In the Select Recipient window, click Advanced.
- In the Advanced window, specify advanced scheduling options. In the Path field, enter the path to the folder where the generated report will be stored. In the File Name field, specify the location of the script file.
To follow this example, enter C:\reports in the Path field. In the File Name field, enter the path to the script and pass the report name parameter to the script: C:\reports\postdelivery.bat %ReportName%
- Save the scheduling settings.
Expected Result
At the specified schedule time, Veeam ONE Reporter will automatically generate the reports. When a report is created, Veeam ONE Reporter will trigger the script that will copy the report to a separate folder.