简体   繁体   中英

GUID of a custom SSRS report Published in Dynamics CRM 365

I have a custom SSRS report published to MS Dynamics 365 that I am trying to call on a form button-click. I want to run the report for a selected record of an Entity. I am able to retrieve the EntityGuid run-time and pass it to the report.

  • How do I get the ReportGuid in order to pass it as an argument in the url ?

  • What is an entityType in the Url and where do I find the value of a custom entity?

Url looks like this -

var url = serverUrl + "/" + organizationName + "/crmreports/viewer/viewer.aspx?action=run&context=records&helpID=" + rdlName  + "&id={"+reportGuid+"}&records=" + entityGuid + "&recordstype=" + entityType;
window.open(url);

Open Dynamics CRM -> Navigate to reports -> Find report you wand to get guid of -> select it and click "Edit" button in the Command Bar -> check url of window that popped up -> it should be something like https://yourorgname.crm.dynamics.com/CRMReports/reportproperty.aspx?id=%7b8484A9E3-3F8B-E611-80EE-C4346BAC897C%7d Part after id= is your guid. In my case it is "8484A9E3-3F8B-E611-80EE-C4346BAC897C" Good luck.

The XrmToolbox can help with both questions:

Using the FetchXML tester, this query will retrieve the names and GUID's of all the reports:

<fetch>
    <entity name="report" >
        <attribute name="name" />
        <attribute name="reportid" />
    </entity>
</fetch>

And the MetaData Browser shows each entity's ObjectTypeCode (aka EntityTypeCode or "etc").

在此处输入图片说明

And for the record, CRM provides a way to run a report from a form. After you configure the report to be available from the form, go to ellipsis and select Run Report:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM