Report Jobs Parameters
Parameters for job type ReportJob.
Example of a Job Report Parameters:{
"Report": 123,
"FileType": "Xls",
"Language": "CS",
"File": null,
"XlsSheetName": null,
"Email": {
"To": [ "username@domain.com" ],
"Cc": null,
"Bcc": null,
"Subject": "The subject of the email",
"Body": "The body content of the email",
"FileName": "FileName_{Report.Period}_{CurrentDate :yyyyMMdd}.xlsx"
},
"Parameters": {
"StaticParameters": "{ \"Sites\": [ 1 ], \"IncludeSubSites\": true, \"ActiveOnly\": \"All\", \"XlsHeader\": true }",
"DynamicParameters": {
"Date": null,
"Period": {
"BaseDateOffset": null,
"Type": "Month",
"Offset": -1,
"Count": 1,
"CutBy": null
},
"TimeOffTypes": null
}
},
"StoreToDbParameters": null
}
File
SectionDefinition of the output files locations and names.
Parameters
SectionContains both static and dynamic parameters for the report.
Example:
{
"Parameters": {
"StaticParameters": "{ \"Sites\": [], \"IncludeSubSites\": true, \"ActiveOnly\": \"Active\", \"XlsHeader\": true, \"RosterFinished\": 2, \"WorksheetConfirmed\": 1, \"ChangeConfirmation\": [1, 2, 3] }",
"DynamicParameters": {
"Date": null,
"Period": {
"BaseDateOffset": null,
"Type": "Month",
"Offset": -1,
"Count": 1,
"CutBy": null
},
"TimeOffTypes": null
}
}
}
Use Cases
Report Job for Current or Previous Month
Use CaseThe reporting period is controlled by Period parameter. In the following examples there are specifications for different reporting periods.
Previous month
"Period": {
"BaseDateOffset": null,
"Type": "Month",
"Offset": -1,
"Count": 1,
"CutBy": null
}
Previous week
"Period": {
"BaseDateOffset": null,
"Type": "Week",
"Offset": -1,
"Count": 1,
"CutBy": null
}
Current month
"Period": {
"BaseDateOffset": null,
"Type": "Month",
"Offset": 0,
"Count": 1,
"CutBy": null
}
Previous and Current month
"Period": {
"BaseDateOffset": null,
"Type": "Month",
"Offset": -1,
"Count": 2,
"CutBy": null
}
Dynamic File Naming in Report Job
Use CaseThe output file name can be built dynamically using tokens. Tokens are replaced with real values when the job is executed, so the generated file can include information such as the reporting period or the current date.
File name with reporting period
{
"FileName": "Productivity_Report_{Report.Period}.xlsx"
}
File name with current date
{
"FileName": "Report_{CurrentDate}.xlsx"
}
File name with reporting period and current date
{
"FileName": "{Report.Period}_Report_{CurrentDate}.xlsx"
}
File name with multiple words and multiple dynamic tokens
{
"FileName": "Monthly_Employees_Attendance_Report_{Report.Period}_{CurrentDate:yyyyMMdd}.xlsx"
}
Was this helpful?
