SSRS: How to open CRM Forms from Custom Reports

Just thought I would share how to add a URL in your SSRS reports to open a related CRM record. I spend a little bit of time figuring this out so here it is. I will skip the CRM/SSRS reporting 101 so if you are not familiar with building reports for CRM, you may want to familiarize yourself with basic concepts before you dive into this.

  1. Add a parameter to your report and make sure it prompts for the URL:

    This will return an URL that looks like this: http://YourOrganizationURL/CRMReports/viewer/drillopen.aspx?

  2. Now you can add the URL as an action when some of your elements are clicked. In my example, I have a few columns that when clicking on the value, will open a case, its owner or its customer.

    To do that, I select the column in the table that contains the data and head to the “Action” table; Select “Go to URL” as the action and then click on the function button to setup the URL.

  3. It’s time to use the URL parameter that was defined at step 1 that looks like this http://YourOrganizationURL/CRMReports/viewer/drillopen.aspx. To create a valid URL from here, we have 2 options that I know of… We can
  • Play around with VB to manipulate the String value and remove the part after the Organization URL highlighted in yellow above; from there we build the record URL as per Microsoft Dynamics CRM URL Patterns. It shouldn’t be complicated but I have not tried it.
  • Use a CRM\SSRS report built-in functionality that allows to simple pass the ID and logical name of the record we want to open to the URL received in parameter. It is able redirect to the appropriate form magically.

Obviously, I went with the 2nd option. You expression will look like this: Parameters!CRM_URL.Value & “?ID={” & Fields!incidentid.Value & “}&LogicalName=incident”)

Parameters!CRM_URL.Value : This is the parameter created in step 1
Fields!incidentid.Value: This is the ID of the record you want to navigate to
LogicalName=incident : This is the logical name of the record you want to valigate to

And just as a proof (although this really doesn’t prove anything!) J

And that’s it! It’s magical. Key takeaway here is the fact that if you ask CRM for the URL as a parameter to your report, you get a URL and you then have the flexibility to play around with it and create links to any page you need. The other takeaway is the functionality built in the report to open a record’s form by simple receiving the ID and logical name as parameters. Hope this saves some time for someone one day.


3 thoughts on “SSRS: How to open CRM Forms from Custom Reports

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s