Thursday, 19 June 2008

Reports in IFrames - Updated for CRM 4.0

One of my earlier posts here and on the CRM Team Blog was about writing reports to display in IFrames and via ISV.Config. This was written for CRM 3.0, and although the principle remains the same for CRM 4.0, a couple of changes are required to the report parameters.

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.

Changes to the query string for ISV.Config buttons
In CRM 4.0, Microsoft have standardised the parameters such that they are the same for IFrames and ISV.Config buttons. This means that your report should have parameters id, type, typename, orgname, UserLCID and OrgLCID.


Saritha said...

One way to get around the problem is to put about:blank as the url on
the iframe and check the box for 'pass record object-type...'. Then in the onload event,

var tempId = (crmForm.ObjectId == null) ? "" : crmForm.ObjectId;


If you do this, the report can be written to accept id as the parameter and you need not input all the other querystring parameters that crm would pass by default.

We have been using this method in crm 3.0 for quite sometime now and it works great!

Yenicca said...


Does this mean that for IFD CRM, we'll have to make reportserver internet facing as well?

David Jennaway said...


Yes, with this approach, for an IFD deployment you need to make the ReportServer Internet facing. This is because the user is accessing the Report Server directly, rather than via CRM


knamuduri said...

Hi David,
Great post !!
our environment is CRM IFD with CRM app on one server and sql and SSRS on another server. when I am accessing the report from Iframe user if being prompted to relogin.

Can you please suggest how I can avoid that ?


vishal swami said...

David ,

i am facing the same issue as Karunya :-(

Mike C. said...

Any other info on IFD? I'm getting prompted for login as well.