Tuesday, 26 February 2013

Reading Hyperion Result/Filter Section using VB.Net

1. Declaration of brio object & document.

Dim mybrioobj As New BrioQry.Application
Dim myDdoc As BrioQry.Document


2. Openning brio file from the location "path".

Set myDdoc = mybrioobj.Documents.Open(path)


3. Create Query Section object, Section name is the name of the query section. A brio file can have query section, filter result/table section, pivot & dashboard.

Dim res As BrioQry.TableSection
Set res= mySdoc.Sections(ResultSectionName)


4. Looping all result/table section columns or fields.

 For l = 1 To res.Columns.Count
                ColumnName = res.Columns.Item(l).Name.ToString
                ColumnType = res.Columns.Item(l).ColumnType
                ColumnIndex = res.Columns.Item(l).Index
                DataType = res.Columns.Item(l).DataType
                NumberFormat = res.Columns.Item(l).NumberFormat
                WrapText = res.Columns.Item(l).TextWrap
                Visible = res.Columns.Item(l).Visible
 Next


5. Looping result section filters.

 For l = 1 To res.Limits.Count
           LimitName = res.Limits.Item(l).DisplayName
           LimitSQL = res.Limits.Item(l).CustomSQL
           CustomLimitValues = comstomlimitstring
           CustomValueCount = res.Limits.Item(l).CustomValues.Count
           Selected Values = selectedValues
           SelectedValueCount = res.Limits.Item(l).SelectedValues.Count
           LimitOperator = res.Limits.Item(l).Operator
           Is Ignore = res.Limits.Item(l).Ignore
           Is Nagate  = res.Limits.Item(l).Negate
           Logical Operator = res.Limits.Item(l).LogicalOperator
           Limit Value Type  = res.Limits.Item(l).LimitValueType
           Include Nulls  = res.Limits.Item(l).IncludeNulls
 Next

6. Closing Objects

 myDdoc.Close                                'or     mybrioobj.ActiveDocument.Close  mybrioobj.Quit
 Set mybrioobj = Nothing

Reading Hyperion Brio Filter Section using VB6

1. Declaration of brio object & document.

Dim mybrioobj As New BrioQry.Application
Dim myDdoc As BrioQry.Document


2. Openning brio file from the location "path".

Set myDdoc = mybrioobj.Documents.Open(path)



3. Create Query Section object, Section name is the name of the query section. A brio file can have query section, filter result/table section, pivot & dashboard.

Dim qry As BrioQry.QuerySection
Set qry = mySdoc.Sections(SectionName)


4. Looping all Filter/Limit items

 For l = 1 To qry.Limits.Count
               LimitName= qry.Limits(l).DisplayName
               LimitSQL = qry.Limits(l).CustomSQL
               For i = 1 To qry.Limits(l).CustomValues.Count
                       LimitCustomValues(i) = qry.Limits(l).CustomValues(i)
               Next
               ReqLimits(l).intMaxCustomVal = qry.Limits(l).CustomValues.Count
               For i = 1 To qry.Limits(l).SelectedValues.Count
                      LimitSelectedValues(i)= qry.Limits(l).SelectedValues(i)
               Next
               MaxSelectedVal = qry.Limits(l).SelectedValues.Count
             
               Operator= qry.Limits(l).Operator
               IgnoreLimit = qry.Limits(l).Ignore
               NegateLimit = qry.Limits(l).Negate
               LogicalOperator = qry.Limits(l).LogicalOperator
               ValueType = qry.Limits(l).LimitValueType
               isNull = qry.Limits(l).IncludeNulls
              
               For i = 1 To qry.Limits.Parentheses.Count
                     limParenthesis(i).parcount = qry.Limits.Parentheses.Count
                     limParenthesis(i).parstartlim = qry.Limits.Parentheses(i).BeginLimitName
                     limParenthesis(i).parendlim = qry.Limits.Parentheses(i).EndLimitName
                     limParenthesis(i).parname = qry.Limits.Parentheses(i).name
               Next
     Next



4. Closing Objects

 myDdoc.Close                                'or     mybrioobj.ActiveDocument.Close
 mybrioobj.Quit
 Set mybrioobj = Nothing

Thursday, 15 November 2012

Reading Hyperion Brio Query Section using VB6



1. Declaration of brio object & document.

Dim mybrioobj As New BrioQry.Application
Dim myDdoc As BrioQry.Document



2. Openning brio file from the location "path".

Set myDdoc = mybrioobj.Documents.Open(path)




3. Create Query Section object, Section name is the name of the query section. A brio file can have query section, result/table section, pivot & dashboard.

Dim qry As BrioQry.QuerySection
Set qry = mySdoc.Sections(SectionName)




4. Looping all request items

For l = 1 To qry.Requests.Count
               RequestName = qry.Requests(l).DisplayName
               SQLName = qry.Requests(l).SQLName
               DataType = qry.Requests(l).DataType
               isUniqueRows = qry.UniqueRows
               isVisible = qry.Requests(l).Visible
Next



4. Closing Objects

 myDdoc.Close                                'or     mybrioobj.ActiveDocument.Close
 mybrioobj.Quit
 Set mybrioobj = Nothing