Answers.Body: <p>If you are setting the filter value (with a default) and don't want the user to change it, you can use the 'no_display' parameter to hide the filter from the user.  (Per the docs here: <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+Reference#CiviReportReference-filters" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+Reference#CiviReportReference-filters</a> ) Unfortunately, it doesn't look like the Required parameter is an option for filters like it is for fields.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-09T19:02:42.990Z
Answers.LastActivityDate: 2017-05-09T19:02:42.990Z
Answers.UserDisplayName: Allen Hutchison
Body: <p>I have made some custom reports which contain two types of filters:</p>
  
  <ol>
  <li><p>a date field. This does not correspond to a database field. Its
  just used in some calculations</p></li>
  <li><p>some custom fields </p></li>
  </ol>
  
  <p>Is it possible to make these filters mandatory? Defaulting the values doesn't really help.</p>
  
  <p>OR is it possible for the report to produce a custom error message which the user can see if the field is not set? For example, in the custom report if the filter values are not set then set error message and stop running the report.</p>
  
Tags: <wordpress><custom-fields><civireport><4.7><custom-reports>
Title: Is there a way to make report filters mandatory
ThreadText: # Is there a way to make report filters mandatory
  
  (Asked by: username_0 on 2017-04-20)
  
  I have made some custom reports which contain two types of filters:
  
  1. a date field. This does not correspond to a database field. Its
     just used in some calculations
  2. some custom fields
  
  Is it possible to make these filters mandatory? Defaulting the values doesn't really help.
  
  OR is it possible for the report to produce a custom error message which the user can see if the field is not set? For example, in the custom report if the filter values are not set then set error message and stop running the report.
  
  **Tags:** wordpress, custom-fields, civireport, 4.7, custom-reports
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-05-09. Score: 1
  
  If you are setting the filter value (with a default) and don't want the user to change it, you can use the 'no\_display' parameter to hide the filter from the user. (Per the docs here: <https://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+Reference#CiviReportReference-filters> ) Unfortunately, it doesn't look like the Required parameter is an option for filters like it is for fields.
  
  
  ---
  
  