# Matomo.GenerateScheduledReport: Matomo Matomo tracking actions Matomo.GenerateScheduledReport: Matomo Matomo tracking actions Render a scheduled report definition on demand, without sending it. Documentation Wraps ScheduledReports.generateReport, always with Matomo's own outputType=1 (OUTPUT_DOWNLOAD) - a fixed constant of this call, not a parameter, chosen because it is the one output mode that answers the rendered document as a raw HTTP response body rather than wrapped in JSON. Every other outputType either streams to a browser Matomo has none of here, writes to disk (design has no use for a file this driver's own connection cannot read back), or - format=json's own OUTPUT_RETURN - answers the rendered bytes as a JSON string value, which a genuine PDF response confirmed live 2026-08-26 is not always valid JSON text (Matomo writes the raw bytes into the JSON string without base64-encoding them). Built on GetImageGraph's own precedent (HttpWorker.PostReturningBytes, not this class's own JSON-parsing PostFormUrlEncoded) for exactly that reason, rather than risk a corrupted response. reportFormat/period/language all default to the report's own stored settings when omitted - matching generateReport's own PHP defaults, not reproduced here.Parameters of Procedure The following parameters can be used to control the behaviour of the procedure `Matomo.GenerateScheduledReport`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values. Value specification by position is done by listing all values from the first to the last needed value. For example: a `begin package.procedure(value1, value2, value3); end` on a procedure with four parameters will use the default value for the fourth parameter and the specified values for the first three. Value specification by name is done by listing all values that require a value. For example with `begin package.procedure(name1 => value1, name3 => value3); end` on the same procedure will use the default values for the second and fourth parameters and the specified values for the first and third. | Name | Data Type | Required | Default Value | Documentation | |---|:---:|:---:|:---:|---| | `id_report` | `int32` | ☑ | | Scheduled report to render - ScheduledReports.Reports' own idreport, or the id_report a prior Matomo.AddScheduledReport call answered back. | | `dates` | `string` | ☑ | | The date the report's own period is anchored on, for instance 'today' or '2026-08-01'. | | `period` | `string` | ☐ | | Overrides the report's own stored delivery period ('day', 'week', 'month') for this one rendering. The report's own period applies when omitted. | | `report_format` | `string` | ☐ | | Overrides the report's own stored output format ('pdf', 'html', ...) for this one rendering. The report's own format applies when omitted. | | `language` | `string` | ☐ | | Language the rendered report's own text is written in, for instance 'en' or 'nl'. Matomo's own default language applies when omitted. |