This returns an instance of a RTRReportResult object after running the report. Use the methods provided by the RTRReportResult class to access the report data.
Filters can be specified for the report execution. The report filters specified match the filters defined in the RTR Report Metadata configuration (RTR Report Configuration SObject record). Depending on the filter type, the expected filter must have a specific structure or type.
singleselect
Here’s an example of how the report’s filter metadata looks:
Here’s an example of how the filter using Apex looks:
The filter must be represented by an object with the year, start, and total properties.
Note
1...2 'periodmonth' =>new Map<String, Object>{3 'start' =>0, // The starting month. A value between 0 (January) and 11 (December)4 'total' =>12, // How many month data to retrieve. A value between 1 and 185 'year' =>2022 // The starting year6},7...
periodweek
Here’s an example of how the report’s filter metadata looks:
Here’s an example of how the filter using Apex looks:
The filter must be represented by an object with the year, start, and total properties.
Note
1...2 'periodweek' =>new Map<String, Object>{3 'start' =>0, // The starting Week. A value between 0 (First week of the year) to 70 4 'total' =>12, // How many weeks data to retrieve. A value between 1 and 1005 'year' =>2022 // The starting year6},7...
hidden
Here’s an example of how the report’s filter metadata looks: