on ‎2017 Dec 04 2:30 PM
Hi All
System : BPC 10.0
EPM Add-In : SP28 Patch 2
Requirement:
I have a report in which user selects a dimension from a drop-down and then based on the dimension selected the dimension members are selected from a EPMContextMember formula. Both these values are passed into an EPAxisOverride formula
Cell P42 has =EPMContextMember(,P41)
=EPMAxisOverride("000",TRUE,P41,P42)
I have a simple custom Refresh via a VBA button
Sub REFRESH()
Dim a As New FPMXLClient.EPMAddInAutomation
a.RefreshActiveWorkBook
End Sub
However, when I refresh the sheet using button, the AxisOverride doesnt work.
When I refresh the sheet using the "Refresh" icon from Excel ribbon, the dimension override does work.
Screenshot with Refresh via VBA button, where the user selection via EPMContext is not reflected in the Rows
Screenshot with Refresh using EPM Ribbon, where the user selection via EPMContext is reflected in the Row
Request clarification before answering.
For sure it's incorrect to disable events when you call RefreshActiveWorkBook or other EPM API functions!
In my test everything was fine with just the code you have post:
Public Sub REFRESH()
Dim a As New FPMXLClient.EPMAddInAutomation
a.RefreshActiveWorkBook
End Sub
P.S. In future please post FULL code you are trying to run!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, but you have to provide full info if you really want an answer:
Sample report screenshot with formulas visible
EPM SP
Step-by-step scenario.
P.S. Why you are using EPMAxisOverride instead of EPMDimensionOverride?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
EPM Add-In : SP28 Patch 2
The user will be selecting dimension from a drop-down then the members from a EPMContextMember formula
Screenshot with Refresh via VBA button, where the user selection via EPMContext is not reflected in the Rows
Screenshot with Refresh using EPM Ribbon, where the user selection via EPMContext is reflected in the Row
First - it's a bad idea to use "Insert File" instead of "Insert Image" Hate list #3
Second "Sample report screenshot with formulas visible" - formulas in P41 and P42 are not visible!
Hi Vadim,
Sorry. Will keep this in mind in 'Insert Image' instead of 'Insert File' in future
Meanwhile, I have found the issue.
I was disabling events before Refresh and then enabling them after Refresh and probably the override event was not triggering. The moment I commented outh these 2 lines, the AxisOverride worked with the Refresh button
Application.ScreenUpdating = False
'Application.EnableEvents = False
Call REFRESH
Application.ScreenUpdating = True
'Application.EnableEvents = True
| User | Count |
|---|---|
| 15 | |
| 11 | |
| 11 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.