function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Darko TodorovskiDarko Todorovski 

Dynamically Filtered Reports in visualforce page

Hi,

I am trying to develop a dynamicall filtered Report in visualforce and I am having dificulties.

What I did so far?

I created the report with desired things and took the report id and paste it inside the code below.
What I want to accomplish is a filter criteria that will give me values for the field Number of days(Number_of_Days__c) to be lower or equal to 365. Or the Month(date field, Month__c). I want this report to show the values for the last 12 months.

<apex:page standardController="Account">
   <p>
  <a href="/00O200000070MzL?pc0=ACCOUNT_ID&pn0=eq&pv0={!LEFT(Account.ID,15)}&pc1=Number_of_Days&pn1=le&pv1=365" target="_blank">Revenue Share</a>
  </p>
</apex:page>

Thanks in advance,

Darko

SRKSRK
Just want to check and suggent you if you have not gone throw these links before please go throw it once

https://success.salesforce.com/ideaView?id=08730000000l1FmAAI
https://developer.salesforce.com/forums/?id=906F00000008q0sIAA


There are few considration needs to be take care of while saving report if you want to use a report like this 

exmaple 
Keep in mind that you can use the methods we have covered here to override filter criteria for existing report allowing you to reuse them when necessary instead of having to create a report with predefined filters where you only pass the filter value (pv).

please read these post and confirm that your report full fill all condtions