How to Switch the Filter Order of an SCRM Report

System Center

The procedure in this topic describes how to switch the Company and Program Name filter order in the Add or Remove Programs Inventory Summary report to display the Program Name before the Company filter. This switch is useful because report users often know the name of a program but not always the name of the company.

Note
You cannot switch the order of a SCRM 2006 report filter until you have changed the business logic of the underlying stored procedures and then updated the report definition in SQL Server Business Intelligence Development Studio.

Before you begin this procedure, you must first obtain the report definition language file for the Add or Remove Programs Inventory Summary SCRM report and then create an SCRM report server project, which you will use in step 3 of the following procedure. For information about how to perform these tasks, see How to Obtain the Report Definition Language File for an SCRM Report and How to Create an SCRM Report Server Project.

To switch the filter order of an SCRM report

  1. Using SCRS_GetCompany, create a stored procedure named SCRS_GetCompany_CUSTOM to query the company list based on the input program name. See Code Sample: SCRS_GetCompany_CUSTOM SCRM Stored Procedure for the completed stored procedure.

  2. Using SCRS_GetProgramName, create a stored procedure named SCRS_GetProgramName_CUSTOM to query the program list without using the Company name. See Code Sample: SCRS_GetProgramName_CUSTOM SCRM Stored Procedure for the completed stored procedure.

  3. Open the SQL Server Business Intelligence Development Studio project you created earlier.

  4. In Solution Explorer, right-click the report and then select View Code.

  5. In the code, search for the node <QueryParameter Name="@Company"> and delete it.

  6. Search for the node <ReportParameter Name="ProductName">, and move it above the node <ReportParameter Name="Company">.

  7. Search for the node <DataSet Name="Company">.

  8. In the child <Query> node, change the child element <CommandText> with the value SCRS_GetCompany to SCRS_GetCompanyCUSTOM.

  9. Search for the node <DataSet Name="ProductName">.

  10. In the child <Query> node, change the child element <CommandText> with the value SCRS_GetProgramName to SCRS_GetProgramNameCUSTOM.

  11. Search for the node <ReportParameter Name="ProductName">.

  12. Move the child node <DefaultValue> to the node <ReportParameter Name="Company">.

  13. In Solution Explorer, right-click the report and select View Designer.

  14. In the design view, click Preview to verify the changes, and then publish the report.

See Also

Show: