Answered by:
Passing parameters to CRM Reports through URL

Question
-
Hi all,
My CRM is deployed through IFD.
Im using Sql reports as Dashboards deployed to Sharepoint via Performancepoint Server.
Now i want to use the drillthrough fucntionality in the Dashboard reports to open sub reports, as sql reports are not available through internet calling subreport(sql report service report) will not be helpful.
i thought of calling CRM reports (as they are available over internet through IFD) by passing parameters through Url.
Can anyone help me to resolve the problem.
Or provide me any alternative.
Regards
RakeshThursday, February 18, 2010 6:07 AM
Answers
-
Hi rakesh,
the links i gave u are for CRM
the "<organization url>" means? is it the name of the MS CRM Business Unit?, the URL will start name of the server where the reports are hosted. did you went through the above links?
for organization, you have to use as suggested by david
Extra Parameters passed by CRM
To support multi-tenancy and multi-language deployments, CRM 4.0 passes additional parameters on the query string when the 'pass record object-type...' option is set for the IFrame. These extra parameters are orgname, UserLCID and OrgLCID.
For the report to work in reporting services you will have to add parameters with these names to your report. The orgname parameter has to be a string, the UserLCID and OrgLCID can be either strings or integers. As with the type and typename parameters, these new parameters don't have to be used in the report, they just need to exist for reporting services to accept values for them on the query string.
http://mscrmuk.blogspot.com/2008/06/reports-in-iframes-updated-for-crm-40.html
Accessing the report from a browser
The syntax for rendering a report from a url takes the following form:
http://server/reportserver?/Excitation+Test_MSCRM/Account+Opportunity+Summary&rs:Command=Render
Where:
http://server/reportserver is the url to the report server (not the Report Manager)
/Excitation+Test_MSCRM/Account+Opportunity+Summary is the path to the report, which you can find via Report Manager.
Using the above url will render the report, but with extraneous information. The following additional parameters will remove the toolbar and parameter list:
&rc:Toolbar=false&rs:ClearSession=true
The first of these removes the toolbar and parameter list, and the second ensures that the report is run with new data each time it is accessed
- Marked as answer by DavidJennawayMVP, Moderator Sunday, March 14, 2010 2:16 PM
Thursday, February 18, 2010 10:14 AM -
I am not sure, but I think there is no harm in using SRS Reprts on IFD environemnt.
Also you can integerated with sharepoint for dashboard.
check this link, it may be helpful.
http://jianwang.blogspot.com/2008/11/code-crm-40-dashboard-intergate-with.html- Marked as answer by DavidJennawayMVP, Moderator Sunday, March 14, 2010 2:14 PM
Thursday, February 18, 2010 12:33 PM
All replies
-
Hi,
Is there any way to pass parameters to CRM Reports through Url.
Thanks in advanceThursday, February 18, 2010 7:05 AM -
Hi Rakesh,
bascijallly its like
document.all.IFRAME_Name.src='http://crmserver/reportserver?myreport&rs:Command=Render&rc:Toolbar=false&rs:ClearSession=true&id='+tempId;
but for detail, check these links, it may help you
http://social.microsoft.com/Forums/en-US/crm/thread/ad38ab69-14a0-44a4-ab76-54c43ccbfecb
http://blogs.msdn.com/crm/archive/2007/10/04/writing-reports-to-display-in-iframes-and-from-isv-config.aspx
http://mscrmuk.blogspot.com/2008/06/reports-in-iframes-updated-for-crm-40.html
http://groups.google.com/group/microsoft.public.crm/browse_thread/thread/089497a95a6cdc1c
http://chewyikfong.spaces.live.com/blog/cns!F8F043338BD33DFE!310.entry?sa=249166119
http://www.microsoftcrmhouston.com/Using_Request.QueryString_with_Dynamics_CRM_4.htm
http://www.microsoftcrmhouston.com/CRM%204.0%20Redirect%20Page%20Using%20Request.QueryString%20with%20JavaScript.htm- Proposed as answer by Mayank Pujara Thursday, February 18, 2010 8:44 AM
Thursday, February 18, 2010 8:08 AM -
Thanks for the reply
But i want to call CRM reports
http://<organization url>/crmreports/viewer/viewer.aspx?id={xxxx-xxxx-xxxx-xxxx}&helpID=<Reportname>
like above
and i want to pass parameters via url to run the report.
Does CRM reports support it or not ?Thursday, February 18, 2010 9:21 AM -
Hi rakesh,
the links i gave u are for CRM
the "<organization url>" means? is it the name of the MS CRM Business Unit?, the URL will start name of the server where the reports are hosted. did you went through the above links?
for organization, you have to use as suggested by david
Extra Parameters passed by CRM
To support multi-tenancy and multi-language deployments, CRM 4.0 passes additional parameters on the query string when the 'pass record object-type...' option is set for the IFrame. These extra parameters are orgname, UserLCID and OrgLCID.
For the report to work in reporting services you will have to add parameters with these names to your report. The orgname parameter has to be a string, the UserLCID and OrgLCID can be either strings or integers. As with the type and typename parameters, these new parameters don't have to be used in the report, they just need to exist for reporting services to accept values for them on the query string.
http://mscrmuk.blogspot.com/2008/06/reports-in-iframes-updated-for-crm-40.html
Accessing the report from a browser
The syntax for rendering a report from a url takes the following form:
http://server/reportserver?/Excitation+Test_MSCRM/Account+Opportunity+Summary&rs:Command=Render
Where:
http://server/reportserver is the url to the report server (not the Report Manager)
/Excitation+Test_MSCRM/Account+Opportunity+Summary is the path to the report, which you can find via Report Manager.
Using the above url will render the report, but with extraneous information. The following additional parameters will remove the toolbar and parameter list:
&rc:Toolbar=false&rs:ClearSession=true
The first of these removes the toolbar and parameter list, and the second ensures that the report is run with new data each time it is accessed
- Marked as answer by DavidJennawayMVP, Moderator Sunday, March 14, 2010 2:16 PM
Thursday, February 18, 2010 10:14 AM -
Hi
What is the best way to develop Dashboards which would work in IFD environmentThursday, February 18, 2010 12:01 PM -
I am not sure, but I think there is no harm in using SRS Reprts on IFD environemnt.
Also you can integerated with sharepoint for dashboard.
check this link, it may be helpful.
http://jianwang.blogspot.com/2008/11/code-crm-40-dashboard-intergate-with.html- Marked as answer by DavidJennawayMVP, Moderator Sunday, March 14, 2010 2:14 PM
Thursday, February 18, 2010 12:33 PM -
hi. did you ever figure this out? i'm running into the same problem. thanks!Friday, September 17, 2010 12:59 AM
-
Hi - I have the same question "...any way to pass params to CRM Reports through Url" ?
Thanks a lot!
Wednesday, January 5, 2011 8:34 PM -
It depends on which parameters you want to pass. You can always open the report using CRM report url.
I'm looking into passing additional parameters which although not required for CRM, but can be consumed by Report server. Like rc:toolbar.
You can try out following solution:
It simplifies the whole process of showing report on dashboards/forms/new page.
Thanks,
Atul
Monday, March 14, 2011 4:41 AM -
To pass parameters which you have defined in the RDL, say "customerid". You can append the querystring parameter with following syntax:
"p:ParamName1=value1&p:ParamName2=value2"
So, the overall url should be something like:
Thanks,
Atul
Tuesday, March 15, 2011 3:14 PM -
I know one of the biggest issues with CRM and SSRS is that SSRS is not supported in SharePoint (thus PerformancePoint) Integration mode. So you can't really access any SSRS reports in CRM from Share/PerformancePoint. I'd be curious as to how you managed to get an SSRS Report from CRM into SharePoint, though...
--DoddTuesday, March 15, 2011 4:46 PM -
Hi Atul,
That is very helpful. Do you know if there is also a way to pass something like the rs:Format querystring parameter used by SSRS?
Michael
Friday, March 18, 2011 3:11 PM -
Passing SRS related parameters from viewer.aspx is not possible, currently. We're considering this requirement for next release/update.
Thanks a lot for the feedback,
Atul
Friday, March 25, 2011 8:08 AM -
Hi Atul,
Thanks a lot. This was really helpful.
Anubhav
Anubhav BajpaiSaturday, November 12, 2011 4:33 PM -
Is it possible to get around security issues if the report is hosted on a DB server that is http and the CRM front end is https?
My problem is that I figured out how to get the query parameters to work, but when I put that url into the iframe and load the parent html page into my dashboard it does not render. When I render the html directly I get a "Only secure content is displayed."
My report url looks like: http://<crm_backend_db_server>/ReportServer?<reportname>&rs:Command=Render&rc:Toolbar=false&rs:ClearSession=true&<parameter>='1'
but my iframe/html page looks like: https://<front_end>.com//WebResources/<folder>/new_<page>
I've read that this is 'cross-site scripting'... is there any way to hack this to get it to render?
Friday, March 9, 2012 7:16 PM