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
hu yanghu yang 

how to run a report in URL and add date criteria

I have a ReportType,and create a report with this ReportType.
I want to add data criteria when the report is runned in URL.
how can i do that?
salesforce mesalesforce me
hi...

1. In the report URL, do NOT include the "Date Field" which is sending the value 29/09/2008 https://emea.salesforce.com/00O20000001zI6o?pv0=Date Field . - Why? When running the report through the url, salesforce.com is always interpeting the value 29/09/2008 as MM/DD/YYYY instead of DD/MM/YYYY. The error message occurs because there is obviously no month 29.

 

2. INSTEAD create new a formula text field called i.e. "Date Report Field" where your initial Date Field is embedded. The formula is: text(MONTH(Date Field)) & "/" & text(DAY( Date Field)) & "/" & text(YEAR( Date Field)) . Note that the order of the elements in the formula must be month, day, year! - There is no need to include this field into any page layouts.

 

3. Now, create your report URL based on the new FORMULA TEXT FIELD as follows:https://emea.salesforce.com/00O20000001zI6o?pv0=Date Report Field. Done! Your report will run smoothly.