I'm running civiCRM 5.30.0 on Drupal 7.

I've designed a report to be sent weekly. To test it, I manually ran mail_report and got the detail below. Where is type STRING required?

Parameters raw (from db settings): instanceId=[ID of report instance] required format=[csv or print] optional-output CSV or print-friendly HTML, else PDF

Parameters parsed (and passed to API method): a:3:{s:7:"version";i:3;s:10:"instanceId";s:32:"[ID of report instance] required";s:6:"format";s:67:"[csv or print] optional-output CSV or print-friendly HTML, else PDF";}

Full message: Finished execution of Mail Reports with result: Failure, Error message: is not of type String

  • I should add that I manually tested it because cron is not running yet.
    – Tom
    Jan 29, 2021 at 15:53

1 Answer 1


If you run it manually from the scheduled jobs screen you need to edit the mail report entry there and set those parameters. Normally you would set them in the specific command you use for cron for a specific report.

See https://docs.civicrm.org/user/en/latest/initial-set-up/scheduled-jobs/#job_mail_report. For getting the instance id that's a good point. There's a couple ways but one is to go to Reports -> All Reports and then hover over the View Results link and in the url that appears in the browser status bar it's the number after the word "instance", e.g. if it says civicrm/report/instance/5?force=1&reset=1 then the id is 5.

  • Where can I find a syntax guide to make the corrections? And where do I find the "ID of report instance"?
    – Tom
    Jan 31, 2021 at 15:33
  • Have updated answer.
    – Demerit
    Jan 31, 2021 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.