I want a category of users can access some reports, view the results on the screen and print them to PDF. And to prevent any modification of the criteria, I want all the report configuration tabs to be hidden.

This is done by this users role having the permission “access CiviReport” enabled but the “access Report Criteria” one disabled.

But when disabling the “access Report Criteria” permission, the "Print report" and "Print to PDF" actions become inactive.

Is there any way to get what I want ?

Thanks for help.


1 Answer 1


This seems to be a bug in CiviCRM. Below patch will allow anonymous user to Print report or Print PDF.

diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php
index 75a614c836..9acd75c584 100644
--- a/CRM/Report/Form.php
+++ b/CRM/Report/Form.php
@@ -2580,7 +2571,7 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
     if (empty($this->_params) &&
     ) {
-      $this->setParams($this->_formValues);
+      $this->setParams($this->_submitValues);

     // hack to fix params when submitted from dashboard, CRM-8532
@@ -2588,7 +2579,7 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
     // in dashboard mode for report
     //@todo - this could be done in the dashboard no we have a setter
     if (empty($this->_params['fields']) && !$this->_noFields) {
-      $this->setParams($this->_formValues);
+      $this->setParams($this->_submitValues);

Not sure what is the difference between formvalues and submitvalues even though params are considered from submit values for processing.



  • Can you mark it as answered and close the question? Jan 17, 2018 at 3:11
  • Yes works, but not so good ! Many new troubles now : - get a "showBlocks array item not in .tpl = optionField_6" alarm when saving a report; - impossible to modify a report criteria; - when having two reports open in two browser tabs, if deleting one with the "delete" action, we get also the other one to be deleted with the "copy" action. Seems that old parameters are used, not the new actual ones. Jan 17, 2018 at 7:04

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.