关于报表中的跳转url的设定

来源:互联网 发布:红楼梦细节分析知乎 编辑:程序博客网 时间:2024/06/04 19:46

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
 

原创粉丝点击