Generate Dynamic Reports

Reports is an excellent tool in Salesforce.  In reports, we can filter, group, and summarize the data in many ways to give the exact information. Filters in reports use static values and they accept any values at run time. 

Introduction 

Reports is an excellent tool in Salesforce.  In reports, we can filter, group, and summarize the data in many ways to give the exact information. Filters in reports use static values and they accept any values at run time.

For example, a user wants to see all the records in a report based on the current Account’s state. Here, the filter does not support the dynamic value. So, the user needs to create multiple reports with multiple filter conditions.

This dynamic filter value or dynamic report can be accomplished by using a Custom Link or button approach and passing parameters through an URL.

Steps to create dynamic Report

Step 1:Select the Report tab

Step 2: Select New Report -> Select Report Type

Step 3: Click the Create Button to create a report.

Step 4: Create a Filter

The following thinks are important to note while creating a filter in dynamic report

1.Dynamic filter does not contain any value.

2.Field filter order is important.

3.Report Id.

Add Filter

Step 1: Click Add button or drag and drop the field.

Step 2: Add or select the condition.

Step 3: Ensure the value of the field is Null.

Step 4: Click OK button.

Repeat steps 1 through 4 for any additional dynamic filters.

Filter Order

In Salesforce, add more than one dynamic filter with the field label value. The labels are used to differentiate fields.

The label names start with pv followed by numeric value.

generate dynamic report

Step 5: Report ID

Step 1: Click the Save button.

Step 2: Enter the report name, description and folder details.

Step 3: Click Save and Run report button.

generate dynamic report

How to Run the Dynamic Report

Call the Report from the Record Detail Page:

Step 1: Goto Setup -> Search Account in Quick Find Box.

Step 2: Select Buttons, Links, and Actions From the menu.

Step 3: Click New Button or Link from that page.

Step 4: Enter the name and description and select display type as Detail Page Button.

Step 5: Copy and paste the report Id as shown below.

generate dynamic report

Step 6: Click the Save button.

Step 7: Go to Setup – > search Account in quick find box – >select page layout.

Step 8: Add the custom button to page layout.

Step 9: Go to record detail page and Click the Custom button.

generate dynamic report

Limitation 

  1. Standard filters (role hierarchy filters, scope filters, date filters), cross filters, and row limit filters aren’t supported.
  2. Chart filters are not supported.
  3. You can’t add new filters to reports using filter value URL parameters. You can only modify existing filters.
  4. You can’t delete filters from reports using filter value URL parameters.

Conclusion 

Dynamic reports can be built in Salesforce using a Custom button and Filter fields to dynamically pass a field value from database, and it eliminates the need to create and maintain redundant reports in Salesforce.

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.