Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only
  • 1.  Object Required Error Using PAX API to Get Exploration MDX

    Posted 04/30/20 06:28 PM
    We have an interesting issue when trying to use the Reporting.Explorations.GetAt(Application.ActiveSheet.Name).GetSpecification function.

    In VB we are getting an Object Required error.  Tried using PAX 41 and 48.  Whats very strange is we do have one workbook where its working however we can't seem to figure out why that book works and starting from scratch doesn't.  Sample code below, simply checks the change to cell C2 and if changed grabs the spec and puts it in C1.

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Not (Application.Intersect(Range("C2"), Target) Is Nothing) Then
        Dim MDX As Variant
            MDX = Reporting.Explorations.GetAt(Application.ActiveSheet.Name).GetSpecification
            Range("C1").Value = MDX
        End If
    End Sub​


    ------------------------------
    Robby Meyers
    ------------------------------

    #PlanningAnalyticswithWatson


  • 2.  RE: Object Required Error Using PAX API to Get Exploration MDX

    Posted 05/01/20 12:43 PM

    Suggest you split the line between GetAt and GetSpecification so that you can verify the Exploration object is resolved.

    Note that GetAt applies the ActiveWorkbook to resolve the sheet name, in case you have a multi-book scenario.



    ------------------------------
    Ted Phillips
    ------------------------------



  • 3.  RE: Object Required Error Using PAX API to Get Exploration MDX

    Posted 05/01/20 03:07 PM

    Turns out I Had forgot to add the CognosOfficeAutomationExample module.  Problem solved.

     

     

     

     



    ------Original Message------

    Suggest you split the line between GetAt and GetSpecification so that you can verify the Exploration object is resolved.

    Note that GetAt applies the ActiveWorkbook to resolve the sheet name, in case you have a multi-book scenario.



    ------------------------------
    Ted Phillips
    ------------------------------

    #PlanningAnalyticswithWatson