Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only
  • 1.  PAX API - Quick Report Replace

    Posted 01/09/20 11:06 PM
    Trying to sue the PAX API Quick report function Replace, which replaces the MDX of an existing QuickReport, however the function is VB is not accepted with Compile error.

    Using this format: Reporting.QuickReports.ReplaceWithFormats Reporting.GetCurrentReport(ActiveCell).<Quick Report ID>, <MDX statement>, <ReFormat>

    It appears to be an issue with .ID section of the function. Has anyone successfully used this function?

    Cheers


    ------------------------------
    Chris Sutton
    ------------------------------

    #PlanningAnalyticswithWatson


  • 2.  RE: PAX API - Quick Report Replace

    Posted 01/13/20 12:47 AM
    Chris,

    I am replacing quick reports via PAX without any issues.  The sMDX variable refers to MDX view defined on a worksheet.

    Public Sub QR_PPODet_Replace()
       
        Dim QR_RepID As Integer
       
        Worksheets("PPO Detail QR").Activate
           
        Cells(8, 2).Select
       
        QR_RepID = Reporting.GetCurrentReport(ActiveCell).ID
       
        smdx = Worksheets("MDX_PPODet").Cells(20, 3)
       
        If Not IsMissing(QR_RepID) Then
       
            Reporting.QuickReports.Replace QR_RepID, smdx

        Else
       
            Reporting.QuickReports.CreatefromMDX "http://<servername>", ",<PAX Connection>", smdx
       
        End If

    End Sub​

    ------------------------------
    Andrew Davey
    ------------------------------



  • 3.  RE: PAX API - Quick Report Replace

    Posted 01/13/20 09:08 AM
    ​Chris,

    We're successfully replacing quick reports via VBA with the report defined using MDX.  Below is an example from our Supply Planning model.  Give me a call during the week if you need more info.

    Public Sub QR_PPODet_Replace()
       
        Dim QR_RepID As Integer
       
        Worksheets("PPO Detail QR").Activate
           
        Cells(8, 2).Select
       
        QR_RepID = Reporting.GetCurrentReport(ActiveCell).ID
       
        smdx = Worksheets("MDX_PPODet").Cells(20, 3)
       
        If Not IsMissing(QR_RepID) Then
       
            Reporting.QuickReports.Replace QR_RepID, smdx

        Else
       
            Reporting.QuickReports.CreatefromMDX "http://servername", "MRP", smdx
       
        End If

    End Sub 


    ------------------------------
    Andrew Davey
    ------------------------------