
Modifies components (such as buttons and menus) in the EPM custom tab in the ribbon.
List <EpmRibbonAction> actionList = newList<EpmRibbonAction>();
actionList.Add(newEpmRibbonAction(Commands.DeleteReportButton, ActionType.Remove));
actionList.Add(newEpmRibbonAction(Commands.AnalysisGroup, ActionType.Remove));
Button recordButton = Group.CreateNewButton(RecordButton, true, true, "", false);
actionList.Add(newEpmRibbonAction(Commands.EditReportButton, ActionType.AddAfter, newList<object>() {recordButton }));
List <object> componentsToAdd = newList<object>();
Group customGroup = Tab.CreateNewGroup(ExtensibilityGroup);
customGroup.AddNewButton(PlusButton, true, true, string.Empty);
customGroup.AddNewButton(Commands.DeleteReportButton, true, true, string.Empty);
customGroup.AddNewButton(OpenButton, true, true, string.Empty);
componentsToAdd.Add(customGroup);
actionList.Add(newEpmRibbonAction(Commands.CollaborationGroup, ActionType.AddBefore,
componentsToAdd));
return actionList;
public conststring PlusButton = "PlusButtonId";
publicconststring StarButton = "StarButtonId";
publicconststring RecordButton = "RecordButtonId";
publicconststring ExtensibilityGroup = "ExtensibilityGroupId";
The method returns the following list of actions:
List <EpmRibbonAction> actionList = newList<EpmRibbonAction>();
This action deletes the Delete Reports button from the EPM tab.
actionList.Add(newEpmRibbonAction(Commands.DeleteReportButton, ActionType.Remove));
This action deletes the Data Analysis group from the EPM tab.
actionList.Add(newEpmRibbonAction(Commands.AnalysisGroup, ActionType.Remove));
These actions add the button of your choice to the EPM tab. This button is placed after the Edit Report button and is the same type of button.
Button recordButton = Group.CreateNewButton(RecordButton, true, true, "", false);
actionList.Add(newEpmRibbonAction(Commands.EditReportButton, ActionType.AddAfter, newList<object>() {recordButton }));
List <object> componentsToAdd = newList<object>(); Group customGroup = Tab.CreateNewGroup(ExtensibilityGroup); customGroup.AddNewButton(PlusButton, true, true, string.Empty); customGroup.AddNewButton(Commands.DeleteReportButton, true, true, string.Empty); customGroup.AddNewButton(OpenButton, true, true, string.Empty); componentsToAdd.Add(customGroup); actionList.Add(newEpmRibbonAction(Commands.CollaborationGroup, ActionType.AddBefore, componentsToAdd));
Then, you return the list of actions.
return actionList;
The above actions are performed, keeping in mind the following:
public conststring PlusButton = "PlusButtonId"; publicconststring StarButton = "StarButtonId"; publicconststring RecordButton = "RecordButtonId"; publicconststring ExtensibilityGroup = "ExtensibilityGroupId";