Dynamic filters for reports in Salesforce

Follow the below steps to change report criteria dynamically in Salesforce

1. Create a report with conditions null or blank.

2. Create a Visualforce page.

<apex:form >
    <apex:pageBlock >
        <apex:commandButton value="Show Report" onclick="window.open('/00O90000005L3b6?pv0=Karnataka&pv1=Mysore', '_SELF');"/>

here 00O90000005L3b6 is the id of the report.

3. When you click Show Report button, below is the output of the report


No comments:

Post a Comment