Simple Dynamics CRM Advanced Find Report Query

Standard Reports built using SQL Reporting Services use standard SQL command syntax or call a stored procedure via passing parameters.

Dynamics CRM Reports can be built in this same fashion when it's appropriate, however when you're trying to build a report that users may want to filter on the fly without involving your time to rebuild the report, then using the CRM_AF query syntax is a good solution

This method allows you to use a special table alias by adding the CRM_AF prefix to any filteredview name.

Here is a simple example of a query that would allow you to build a report of accounts that could be filtered on the fly using the advanced find utility built into Dynamics CRM:

SELECT * FROM filteredAccount AS CRMAF_FilteredAccount

The CRMAF allows a where clause to be injected into the SQL statement with fields related to that filtered view at run-time, so the resulting query would change to following if the user where to add an equal clause to the query on account name.

SELECT * FROM filteredAccount WHERE filteredAccount.name = 'JourneyTEAM - EASI'

Additional Dynamics CRM Report Parameter Prefixes:

CRM_FilterText The CRM_FilterText parameter contains the value of the filter text that a report user interactively created in the Report Viewer when running a report. The parameter is often seen in a filter summary text box located in the report header. The initial value is set to the default filter.
CRM_URL The CRM_URL parameter is set to the URL of the Microsoft CRM Web application. This parameter is for use when drilling through to Microsoft CRM.
CRM_FilteredEntity The CRM_FilteredEntity parameters are used in a query expression to enable data pre-filtering (through Advanced Find) on a filtered view
CRM_Locale The CRM_Locale parameter is set to the language of the report based on the locale.
CRM_SortField
CRM_SortDirection
These parameters are used to define a sorting column and sorting direction (ascending or descending) for dynamic column sorting in a report.

<<Back
Phone 1(888) 574-EASI | Email info@easiintl.com
Site Map
Copyright © 2010 | Enterprise Alliance Systems, Inc. | Microsoft Dynamics CRM Implementation and Customization | Houston, Texas

Valid XHTML 1.0 Transitional