Applying Filtering to a Class

This topic describes how to apply filtering to a class. Filtering allows the summarization to filter out data based on the value of a member of the base class.

The ClassType attribute of the class definition should be set to "3" for filtering. The InstExclusionExpr attribute of the class definition contains the expression string on which to filter. The filtering feature supports the IN and NOT IN operators using the following syntax:

   Exclusion string = "BaseClassMemberName IN(value)"
   Exclusion string = "BaseClassMemberName NOT IN(value)"

The following examples show how to filter classes.

Ee783741.note(en-US,CS.20).gifNote

Example 1

'Set the class name.
   Set recNew = CreateObject("ADODB.Record")
   recNew("ClassDefName") = "NewRequestAgg"

'Set the class type to aggregation.
   recNew("ClassType") = 3

'Set the name of the base class to use for data.
   recNew("BaseClassName") = "Request"

'Set the exclusion string (filter).
'This excludes all data from the aggregation where IsRequest = 1.
   recNew("InstExclusionExpr") = "IsRequest IN(1)"

Example 2

'Set the class name.
   recNew("ClassDefName") = "NewHTTPStatustAgg"

'Set the class type to aggregation.
   recNew("ClassType") = 3

'Set the name of the base class to use for data.
   recNew("BaseClassName") = "Request"

'Set the exclusion string (filter).
'This excludes all hits that have an HTTPStatus not in the given set.
   recNew("InstExclusionExpr") = _
    "HttpStatus NOT IN(0,200,202,203,204,304)" 

Copyright © 2005 Microsoft Corporation.
All rights reserved.