Tuesday, April 19, 2011

Passing the CRM_URL from Parent Record to Drill-Down records

Part 1:

I think most of us know that the CRM_URL parameter in the report allows us to open the CRM record directly from the reports. For those of you who do not know this, you can probably refer to this link: Using CRM_URL Report Parameter

Part 2:

The above feature will work if you are trying to open the CRM record from any main report. In my scenario, I had a main report called 'Contact Category'. Clicking on any category will drill down to another report called 'Contact Details'.  Now, when the user clicks on a particular contact's name, I wanted to open the respective CRM contact record. 
When I tried the steps in the above link, it did not work for me. On further investigation I found that, when we drill-down from a main report into a child report, the child report is opened within the context of the main report i.e. the URL displayed in the address bar will be of the main report and not of the child report. 
As a result, the report does not recognize the parameters that are declared in the child report. 

To resolve this issue, we need to pass the CRM_URL parameter from the main report to any of the child or drill-down reports. To do this, 
a. Create a new "Hidden"  report parameter called CRM_URL in the parent report.
b. Select "Allow null value" and "Allow Blank Value".
c. Now, navigate to the report properties where you specify which drill-down report to navigate to (In SSRS 2008, its Report Properties-->Action-->Go to Report-->Child report)
d. Add a new parameter that needs to be passed to the child report.
e. Select CRM_URL from under the "Name" drop down list
f. Type "=Parameters!CRM_URL.Value" for the value and click on OK.
g. Perform the steps specified in the above link for the child report.

Save and upload your reports. Now, every time you drill down to the child report, the CRM_URL parameter also gets passed from the parent report as a result, allowing you to open the respective CRM record.

Thats it!


  1. Yaad aa raha hain tumne ne kuch kiya tha kisi jamane main :)

  2. Nice article, especially part 2. Saved me a lot of time. Thanks!