Pass parameter to RDL

Sometime we need to send parameter dynamically to SSRS report, to achieve it below JS function will help … here key thing is “&p:”, whatever next to this one will be considered as parameter, e.g. “&p:parameterName=parameterValue”. You can pass more than one parameters too.

Here is the actual JavaScript function ….

function OpenRDLReport() {
    var rdlName = "rpt_SoftSummary.rdl";
    var reportGuid = "DFA6F919-426D-E911-80E6-115056B318E5";
    var entityType = "11061"; 
    var entityGuid =;
    var url = Xrm.Page.context.getClientUrl() + "/crmreports/viewer/viewer.aspx?action=run&context=records&helpID=" + rdlName + "&id={" + reportGuid + "}&records=" + entityGuid + "&recordstype=" + entityType;
    //Set parameters 
    url = url + '&p:siteID=' + entityGuid;, null, 'width=1000, height=800, directories=no, location=no, menubar=no, resizable=yes, scrollbars=1, status=no, toolbar=no');
    return false;

That’s it for now!!


Some additional links

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s