You will need:
- BusinessObjects Enterprise XI 3.x: You need BusinessObjects client tools installed on your PC, and a connection to a BusinessObjects server.
- Visual Studio C#: You can install Microsoft Visual Studio Express from http://www.microsoft.com/express/downloads/.
- Create new project: File > New Project… > Console Application
- Add reference to the SDK: Project > Add Reference… > COM > BusinessObjects Designer 12.0 Object Library
- Now you can start coding!
Getting started
The Designer SDK is quite simple and easy to use. Universe Designer API Reference is all you need to solve almost any task (that can be solved via the SDK).
Class Application is the main class that represents the Designer product. When an instance of Application is created, Desiner is started on background, and you can see designer.exe in Task Manager. The first thing you usually do starting Designer is logging in. The same should be done in the program using either function LogonDialog() or Logon(UserName, password, CMS, authenticationMode). In the end the program should quit the Designer, otherwise the designer.exe will stay running, even when your program finished. For this reason, your code should handle possible exceptions and quit the application before quiting the program.
using System; using Designer; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Application application = new Application(); try { application.LogonDialog(); // ... some code here ... } catch (Exception ex) { Console.WriteLine(ex.ToString()); } finally { application.Quit(); } } } }
Hello Universe!
The following program imports the standard universe “Island Resorts Marketing” and prints the structure of its classes.
using System; using Designer; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Application application = new Application(); try { application.LogonDialog(); Universe universe = application.Universes.OpenFromEnterprise( "webi universes", "Island Resorts Marketing", false); Console.WriteLine(universe.Name); PrintClasses(universe.Classes, 3); universe.Close(); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } finally { application.Quit(); } } static void PrintClasses(Classes classes, int indent) { foreach (Class theclass in classes) { Console.WriteLine( new String(' ', indent) + theclass.Name + " [" + theclass.Objects.Count + " objects, " + theclass.PredefinedConditions.Count + " conditions]"); PrintClasses(theclass.Classes, indent + 3); } } } }
We used the above code in C#.net but it showing an error as
Retrieving the COM class factory for component with CLSID {0A5A217D-CC20-42EF-BF9E-9222080DBC13} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
Please help us to resolve the error
LikeLike
I am also getting the same error.
LikeLike
I have come across a problem that many other people complain about all over this site. When compiling, you cannot register the designer.exe visual c# reference or alternatively, when running compiled code, you get error like
'Cannot connect to BO: Unable to cast COM object of type 'Designer.ApplicationClass' to interface type 'Designer.IApplication' bla bla bla No such interface supported
Using regsvr32 to register the designer.exe does not help, but adding it as COMFileReference of your project does. Go tpo your projects .csproj file and add
True
Always
and then copy the designer.exe from your Client tools to the same directory where your sources are.
LikeLike
sorry, the code tag did not work out … so what about this:
<ItemGroup>
<COMFileReference Include=”designer.exe”>
<EmbedInteropTypes>True</EmbedInteropTypes>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</COMFileReference>
</ItemGroup>
LikeLike