Archive

Posts Tagged ‘pass parameters’

Pass parameters to the report hosted in IFrame or Web Page

April 10, 2012 1 comment

Hi,

Assume you have to display related ‘contacts’ of an ‘Account’ in the report hosted in an IFrame.

You can prepare a dataset using below query in the report

SELECT * FROM FilteredContact C

WHERE

C.accountid=@CRM_AccountId

To set parameter @CRM_AccountId‘, you can pass parameter in the URL in this format "&p:CRM_AccountId="={Account GUID}"

Sample URL

var url = Xrm.Page.context.getServerUrl() +  “/crmreports/viewer/viewer.aspx?action=run&context=records&helpID=Internal%20Call%20Report.rdl&id=%7bcd80109a-dc7c-e111-a040-00155dc87c64%7d&records=%7b245DB4C3-927C-E111-9FA1-00155DC87C64%7d&recordstype=1+ “&p: CRM_AccountId=” + accountId;

Below is the useful article explained in detail

Link

Hope it helps 🙂