Hello,
First of all - I'm writing this assuming "Charity" and "Cancelled" are 2 fields you have in your record set. (not values in some "Status" field or anything like that).
Now - if these fields are of "checkbox" type - simply remove or comment two lines with:
$this->rb->set_custom_filter()
And change the 3rd line to
$this->rb->set_filters_defaults(array('charity'=>false));
Notice lower case characters in "charity" and false instead of "No". Outside of installation procedures, where you should be using capitalized strings for field labels ("First Name"), inside the main module and common part, you should resort to lowercase labels ("first_name").
These changes should bring you desired result.
However, assuming you'd like to know why that custom_filter is not working - first and foremost lower case letters in "charity" and "cancelled".
Another very important aspect - it's missing "filter translation" part. Even if you select "No", engine will not understand what is the exact value you want for that field to have. To fix that, you need another value in those arrays, with key "trans". That value should be an array which "translates" key value ("No") to proper criteria (array('charity'=>'No')).
Proper code would look more like this: (untested)
$this->rb->set_custom_filter('charity',array('type'=>'select','label'=>$this->t('Display Charities'),
'args'=>array(
'__NULL__'=>'['.$this->t('All').']',
'Yes'=>'['.$this->t('Yes').']',
'No'=>'['.$this->t('No').']'
),
'trans'=>array(
'__NULL__'=>array(),
'Yes'=>array('charity'=>true),
'No'=>array('charity'=>false)
)
));
$this->rb->set_custom_filter('cancelled',array('type'=>'select','label'=>$this->t('Display Cancelled'),
'args'=>array(
'__NULL__'=>'['.$this->t('All').']',
'Yes'=>'['.$this->t('Yes').']',
'No'=>'['.$this->t('No').']'
),
'trans'=>array(
'__NULL__'=>array(),
'Yes'=>array('cancelled'=>true),
'No'=>array('cancelled'=>false)
)
));
$this->rb->set_filters_defaults(array('charity'=>'No'));
Also - notice how in this code you've chosen keys 'No' and 'Yes' to indicate values, thus filter default must also be set to 'No'. Default engine operates with values true and false, that's why without custom filter you need to set default to false.
Now if these 2 are not fields, but values or if type of those fields is not "checkbox" - that's a new chapter. If that's the case, post the installation file here, I'll help you out.
Kind regards,
Arek