4

I am using a visualforce page on which i am displaying a reportchart using analytics:reportchart.

I am specifying the 2 filter conditions in the filter attribute.

<apex:page>
  <analytics:reportChart developerName="AnalyticsTest"  filter="[{column:'SALES', operator: 'greaterThan', value:'350000000'}, {column:'RATING', operator: 'equals', value:'Warm'} ]"></analytics:reportChart>
</apex:page>

I am looking for a way in which i can change the filter condition logic. Currently, it appears to be defaulting to 1 AND 2. What needs to be done in case i want to change it to 1 OR 2?

Is anybody aware on how to do this?

1
  • With the built in component? Not possible. You could recreate it using the Analytics API.
    – Adrian Larson
    Jul 15, 2016 at 19:20

1 Answer 1

2

It would appear this isn't possible using <analytics:reportChart>. However, depending on your goal here you may be able to achieve the same results through different means.

I set up a test report with a basic OR filter, when I do the describe for the report (/services/data/v37.0/analytics/reports/<reportId>) the filters and filter logic are returned separately which would imply that for what you're doing to work you'd need an additional attribute on the reportChart component to pass that in.

"reportBooleanFilter" : "1 OR 2",
"reportFilters" : [ {
  "column" : "ACCOUNT.NAME",
  "isRunPageEditable" : true,
  "operator" : "equals",
  "value" : "Test 1"
}, {
  "column" : "ACCOUNT.NAME",
  "isRunPageEditable" : true,
  "operator" : "equals",
  "value" : "Test 2"
} ],

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .