Quick Report Refresh after Action Button Run

Post Reply
John Hammond
Community Contributor
Posts: 274
Joined: Mon Mar 23, 2009 10:50 am
OLAP Product: PAW/PAX 2.0.57 Perspectives
Version: Planning Analytics TM1 11.8.00
Excel Version: 2016
Location: South London

Quick Report Refresh after Action Button Run

Post by John Hammond » Thu Jun 03, 2021 6:00 pm

There's a bug in PAX in that None of the action button requests to Auto Recalc or Rebuild does anything to Quick Reports.

I have this piece of code that works by intercepting the call to PAX's action button handler and putting in a call to the API at the end.

The enableevents code is essential to getting this to work. However I have a problem with the action button code in that it does not seems to return a different value according to whether you did not confirm to execute it, executed it successfully or executed it with an error. In all 3 cases msgbox x returns "OK".

In my example I ask if the user has committed his changes and if not the worksheet_refresh happens regardless and so his changes get lost.

' MsgBox Err.Number
' MsgBox Err.Description
' Validate
Public Sub ExecuteAction_ebbe0d00_303c_49ee_a406_a1a72e837acf()
On Error Resume Next
Application.EnableEvents = False ' => disable events
x = Application.Run("ExecuteActionButton", "ebbe0d00_303c_49ee_a406_a1a72e837acf")
MsgBox x
Application.EnableEvents = True ' => enable events
Call Worksheet_Refresh

End Sub

Does anyone have any idea how to fix this or is on a higher version of PAX/PAW than me where this is fixed? (I'm on PAX 2.0.57)

Thanks in advance.

LICENSE_CAFE_COR_version=LICENSE_CAFE_COR-AW32-ML-RTM-11.0.0.46-0
LICENSE_CAFE_COR_name=IBM Cognos License
SWTAG_CAFE_COR_version=SWTAG_CAFE_COR-AW32-ML-RTM-11.0.0.18-0
SWTAG_CAFE_COR_name=SWTAG Analysis for Excel
[Product Update Information]

[Main Applications]

COR_APP_version=COR_APP-AW32-ML-RTM-11.0.57.4-0
COR_APP_name=Cognos 8 Analysis for Excel
CAFES_version=CAFES-AW32-ML-RTM-10.3.0.1-0
CAFES_name=Cafes for Excel
CORREDIST_version=CORREDIST-AW32-ML-RTM-11.0.57.4-0
CORREDIST_name=IBM Planning Analytics for Excel
COI_version=COI-AW32-ML-RTM-11.0.57.1-0
COI_name=IBM Cognos COI
[Cognos Applications]

Post Reply