Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

SRS reports embedded in Microsoft Dynamics CRM IFrames do not refresh properly


View products that this article applies to.

Symptoms

Consider that there is a SQL Server Reporting Services (SRS) report displaying within an IFrame on any specific entity form in CRM. The report is being accessed in this IFrame via URL access parameters for SRS. The jscript snippet defining the report URL is as follows:

var reportUrl = REPORT_SERVER_URL + "REPORT_NAME&rs:Command=Render&rc:Parameters=true&" + "PARAM_NAME=" + SELECTED_VAL

When the record of this entity is updated, the IFrame does not refresh report data with updated values. The data displayed in IFrame updates correctly only if you first close out this record and then open another record of this entity with the report being rendered again for different parameters. Once the original record is reopened now, the report refreshes correctly within IFrame.

↑ Back to the top


Cause

The report server maintains a cached copy of the report being rendered. If the same values for report parameters keep being passed by a user, SRS retrieves report from cache rather than querying each time. When new values are passed into expected parameters by a user, only then the report server is queried for data.

↑ Back to the top


Resolution

The report server parameter that must be passed is rs:ClearSession - this forces the client browser to clear its cached copy of the report and fetch a new copy. In the sample jscript defined previously, this can be updated as follows:


var reportUrl = REPORT_SERVER_URL + "REPORT_NAME&rs:Command=Render&rs:ClearSession=true&rc:Parameters=true&" + "PARAM_NAME=" + SELECTED_VAL

↑ Back to the top


More Information

Refer to the following article for additional details:  http://msdn.microsoft.com/en-us/magazine/cc188712.aspx

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2643144
Revision : 1
Created on : 1/7/2017
Published on : 3/30/2012
Exists online : False
Views : 277