AggregateLimits collection, AppendQueries collection, Association collection, CategoryItems collection, ChartSection object, ColorRanges collection, Columns collection, ControlsDropDown object, ControlsListBox object, ColorRanges collection, Documents collection, Fact collection, Images collection, Joins collection, Limits collection, LimitValues collection, LocalJoins collection, LocalResults collection, OLAPFilter collection, OLAPLabels collection, OLAPMeasures collection, OLAPSlicers collection, Parentheses collection, PivotLabel object, PivotLabelTotals collection, QueryLabel object, Requests collection, Sections collection, SortItems collection, TargetFact collection, TopLabels collection, Topics collection
Common to most collections, the Add (Method) adds an object to a collection and returns a corresponding reference.
Do not use Session.Form.Add(), Session.URL.Add() and Session.Cookies.Add() inInteractive Reporting files deployed in the EPM Workspace. Section.Add is not available for the Dashboard section. |
Note: | The Add method for CubeQuery "download to results" dependent reporting sections (Chart, Pivot, Table, Report) does not accept the CubeQuery "Query" section name as the dependent section argument. This is different from use of the Add method with a relational Query section. With CubeQuery, you must use the downloaded "Results" section as the dependent section argument. |
The Add() method works as follows:
With AvailableValues (Collection): Nothing happens because the values are obtained from the database.
With CustomValues (Collection): Values added to the list.
With SelectedValues (Collection): Value added to a selected list.
For more information see, the Oracle Hyperion Interactive Reporting Object Model and Dashboard Development Services Developer's Guide, Volume II: Object Model Guide to Objects and Collections.
Expression.Add(ItemName As String)
Expression.Add(MemberLocation as String, SelectorType as BQOLAPSelector, IncludeSelf as Boolean, SkipValidation as Boolean)
The Add (Method) adds a new filter to the end of the collection. If there is a filter defined for the given dimension, or the dimension or member do not exist, an exception is thrown. The MemberLocation must be a fully qualified path to a member, including its dimension and all intermediate members, delimited by periods “.”. If the dimension name or any member name contains a period it must be escaped using a backslash. The optional Variable and Ignore arguments can be used to set the initial values of the OLAPFilter Variable and Ignore properties. They both default to false. If the given member location cannot be mapped to a valid dimension and member an exception is thrown.
If an alias table is in use, the member must be specified using the aliases, for example "Year.Quarter1.January", not "Year.Qtr1.Jan". The MemberLocation argument must include the dimension name as the first part of the value. Wildcards may not be used. The FindAndAdd (Property) can be used to add members using wildcards. The SelectorType argument specifies what type of MemberSelector will be created and equates to the right-click menu in the Member Selection dialog. The bqOlapSelector enumeration contains values for Member, Children, Descendants, Bottom, Siblings, Same Level, and Same Generation. The IncludeSelf argument means the member given in the Member argument is to included as well as any members generated by the SelectorType. For example, if "Qtr1" is added on the Year label with a SelectorType of bqOlapSelectorChildren, if IncludeSelf is true four members will be added (Qtr1, Jan, Feb, Mar) but only three members are added if IncludeSelf is false (Jan, Feb, Mar). The IncludeSelf argument only affects the result when SelectorType is bqOlapSelectorChildren, bqOlapSelectorDescendants, or bqOlapSelectorBottom. The optional SkipValidation argument can be used to change the function behavior. The default value is false. When the default value is false, the function behaves as described above. When the value is set to true, the Physical member name must be used instead of member location, and no exception will be thrown even if the member does not exist. An ItemNotFound exception will be thrown if the member does not exist at the location specified. The Add (Method) does not support the Select Next/Previous, Subset, and Dynamic Time Series selectors.
An expression that returns an object for these objects:
This example shows how to create a limit, add limit value, and add the limit to the limit line:
var MyLimit = ActiveDocument.Sections["Query"].Limits.CreateLimit("Stores.Store_Id") MyLimit.SelectedValues.Add(2) ActiveDocument.Sections["Query"].Limits.Add(MyLimit)
This example shows how to add values to a list box and drop-down list:
ActiveDocument.Sections["Dashboard2"].Shapes["DropDown1"].Add(20) ActiveDocument.Sections["Dashboard2"].Shapes["ListBox1"].Add(1)
This example shows how to add new topics to a Data Model and join the topics:
var Topic1 = ActiveDocument.Sections["Query"].DataModel.Catalog.CatalogItems["sales_fact"] ActiveDocument.Sections["Query"].DataModel.Topics.Add(Topic1) var Topic2 = ActiveDocument.Sections["Query"].DataModel.Catalog.CatalogItems["Store_ID"] ActiveDocument.Sections["Query"].DataModel.Topics.Add(Topic2) var TopicItem1 = ActiveDocument.Sections["Query"].DataModel.Topics ["SalesFact"].TopicItems["Store_Id"] var TopicItem2 = ActiveDocument.Sections["Query"].DataModel.Topics ["Stores"].TopicItems["Store_Id"] ActiveDocument.Sections["Query"].DataModel.Joins.Add(TopicItem1,TopicItem2, bqJoinSimpleEqual)
This example illustrates how to add a Pivot section type to a Results section:
ActiveDocument.Sections.Add(bqPivot,"Results")
Unlike a Query, Dashboard, or Report section type, you must associate Chart, Pivot, and Table section types with a parent section. |
This example shows how to add different types of members:
// Add the Qtr1.Jan member, left off IncludeSelf argument because it // is ignored for this selector type Sections["Query"].Rows["Year"].Add("Qtr1.Jan", bqOlapSelectorMember); // Add Jan, Feb, Mar members Sections["Query"].Rows["Year"].Add("Qtr1", bqOlapSelectorChildren, false); // Add Qtr1, Jan, Feb, Mar members Sections["Query"].Rows["Year"].Add("Qtr1", bqOlapSelectorChildren, true); Sections["Query"].Rows["Year"].Add("Year", bqOlapSelectorBottom, true);