You could create a menu in business objects by doing something like this:
Dim BO_CmdbarControl As busobj.CmdBarControl
On Error Resume Next
Set BO_CmdbarControl = Application.CmdBars.Item(2).Controls.Item("&Insert").Controls.Item("&Duplicate Report...")
If Err.Number <> 0 Then ' if error then the menu doesn't exist. Create it.
Set BO_CmdbarControl = Application.CmdBars.Item(2).Controls.Item("&Insert").Controls.Add(1, , 15)
BO_CmdbarControl.Caption = "&Duplicate Report..."
BO_CmdbarControl.DescriptionText = "Duplicates a report"
BO_CmdbarControl.OnAction = ThisDocument.Name & Right(ThisDocument.FullName, 4) & "!ShowForm"
End If
Note: this was taken from one of the business objects add-ins that I use, developed by Glenn Fredericks (glenn_fredericks@aal.org).
Try a search here on BOB for “create custom function” or “function dll” (without quotes). You will probably find these two topics particularly interesting:
compilation Tool : Visual C++ 6.0
Just add the 2 libs ( Sample.lib and External.lib ) to the link librairy files.
Those files are in the BO folder
Start by a DLL project, add the H files and the C file
After the building process, put the DLL made in the UserLibs Folder under BO Folder
By this adding, when you start BO and create a new report, the developped functions will be avaiable under the “Misc Functions” Folder when you creating a variable