If you need to access a Microsoft CRM 2011 report via a URL, you’ll need to do the following:
- Publish the report for external use:
- Go to your SSRS Report Manager (https://<server_name>/Reports).
- Navigate to your published report. Click on the drop down and select Manage:
- Click on Parameters. Here you can see which parameters you could filter the report on. In my case, since I was working with the Quotes Entity, I used the
P1
parameter:
- Note that, in this case, the parameter I’m interested in is a SQL statement. This parameter will be placed within the URL and can be different from what’s specified here. In this case, I’m going to change it to be the following:
select [quote0].* from FilteredQuote as "quote0" WHERE QuoteNumber = '<quote_number>'
- Once you have your parameter, you will need to URL encode it:
select%20%20%5Bquote0%5D.*%20%20from%20%20FilteredQuote%20as%20%22quote0%22%20WHERE%20QuoteNumber%20%3D%20%27<quote_number>%27
- You can now build the URL (note you’ll need to change the
crm_instance_name
below):https://<server_name>/ReportServer/Pages/ReportViewer.aspx?%2f<crm_instance_name>%2fQuote%20-%20Standard&P1=select%20%20%5Bquote0%5D.*%20%20from%20%20FilteredQuote%20as%20%22quote0%22%20WHERE%20QuoteNumber%20%3D%20%27<quote_number>%27
- If you want the Report Manager to output in PDF, simply append the following to the end of the above URL:
&rs:Format=PDF
Good luck!