RDL报表中的CRM_URL用法2009-06-05 17:43To set up drill-through to Microsoft Dynamics CRM:
Create a hidden parameter of type string in the report that has the name CRM_URL. When the report is later run from Microsoft Dynamics CRM, this parameter is automatically set to the Web address of Microsoft Dynamics CRM.
Add a report item, such as a Textbox, that starts the drill-through when you click it.
Right-click the drill-through report item and select Properties from the shortcut menu. The Properties dialog box appears.
Select the Advanced button to display the advanced properties.
In the Navigation tab, check the Jump to URL option and enter an expression in the following format:
= Parameters!CRM_URL.Value & "?ID={"& GUID &"}&OTC=otc"
The entity GUID and entity type code have to be added to the URL to be able to drill through. The entity type code is specified as OTC. For example:
= Parameters!CRM_URL.Value & "?ID={"&Fields!Opportunityid.Value.ToString()&"}&OTC=3"
Click OK to close the dialog box.
In this example code, the value of a dataset field that contains the GUID of an Opportunity object is converted to a string and used as an ID parameter in the URL. A parameter that contains the OTC value (3) for an opportunity entity is also appended.
The GUID of an entity instance can be obtained from the appropriate filtered view, for example, FilteredOpportunity. The OTC value for each entity can be obtained by executing the following SQL code in Query Analyzer:
USE <organization>_MSCRM
SELECT Name,ObjectTypeCode FROM dbo.Entity ORDER BY ObjectTypeCode
本文介绍如何在RDL报表中使用CRM_URL参数实现与Microsoft Dynamics CRM的钻取链接功能。通过创建隐藏字符串参数并结合实体GUID及类型代码,可以自动生成指向CRM中特定记录的URL。
1908

被折叠的 条评论
为什么被折叠?



