AddAll (Method)

Applies To:

SelectedValues collection (instantiate from the LimitValues Collection)

Description:

Enables you to select all values from the AvailableValues (Collection) or CustomValues (Collection) depending on the selection.

Use this method with the LimitValueType (Property) to determine in advance which limit value set is selected. The value associated with this property is a member of the BqLimitValueType constant group. Two possible values of BqLimitValueType are: bqLimitValueTypeAvailable and bqLimitValueTypeCustom.

Note:

Select single values using the Add (Method) of the SelectedValues (Collection). To do so, you must already know all the values. This way of selecting a value can become tedious when there are a lot of values.

Syntax:

Expression.SelectedValues.AddAll();

Expression Required:

An expression that returns a limit object

Example:

In this example, a Quarter limit is created, added to the limit line in the Query section, and all available values in the Limit dialog box added:

//Adds a limit to the limit line of the Query section
mylimit =ActiveDocument.Sections["Query"].Limits.CreateLimit("Periods.Quarter")
mylimit.Operator=bqLimitOperatorEqual
ActiveDocument.Sections["Query"].Limits.Add(mylimit)
//Selects ALL Available values in the Limits dialog ActiveDocument.Sections["Query"].Limits[1].SelectedValues.AddAll()