BusinessObjects Board

Reading variables from a Webi report using the .NET SDK

Hi All,

I’m trying to access and read variables in Webi reports programmatically.

Having used .NET in the past and having no experience of Java I have opted for the .NET route.

I have got as far as connecting to a Webi document using BusinessObjects.ReportEngine. I can then list and access the DataProviders which is different queries but can not find how to access the variables.

I’m using XI3.1 and the latest V12 SDK files.

Can anyone help or point me in the right direction please?

Cheers,

John


clarej :uk: (BOB member since 2008-01-22)

I’m having tough time with .NET SDK for Webi (RENET) too. The variables are stored in a dictionary object that is tied to the reportDictionary. The actual result set (query) comes from resultSet object. I haven’t been able get Class names for objects from universe via .NET, maybe not supported yet? This code should get you closer


            IDocumentInstance doc = null;
            IDataProviders dataProviders = null;
            IReportDictionary dictionary = null;
            OpenDocumentParameters parameters = new OpenDocumentParameters();
            parameters.SetIgnoreRefreshOnOpen(true);
            doc = reportEngine.OpenDocument(infoObject.ID,parameters);
            dataProviders = doc.DataProviders;
            dictionary = doc.GetDictionary();

foreach (IDataProvider dataProvider in dataProviders)
        {
	for (int j = 0; j<dataProvider.FlowCount; j++)
                    {
                    IRecordset rs = dataProvider.GetResult(j);
                        for (int i = 0; i < rs.ColumnCount; i++)
                        {  Console.WriteLine(rs.ColumnName(i) + "  "   + rs.ColumnType(i) + ....
			}  //end rs loop
		    } //end Flow Count loop
	} //end dataprovider loop
	
for (int i = 0; i < dictionary.ChildCount; i++)
            {
                Console.WriteLine("   DEBUG: dictionary routine " + infoObject.Title);
                try
                {
                    Console.WriteLine(
                        infoObject.ID.ToString() + delimiter
                        + infoObject.CUID.ToString() + delimiter
                        + dictionary.GetChildAt(i).ID + delimiter
			..........
                        );
                }

mstockwell :us: (BOB member since 2006-10-23)

Nice to know I’m not the only one!

Thanks so much for this pointer. I’ll have a play down this route and feedback here what I find.

Just out of interest what are the issues you’re having? I have been through almost everything trying to find the variables so I may be able to help.

Thanks again,

John


clarej :uk: (BOB member since 2008-01-22)

We’re using the Document a Universe Utility and loading the xls into SQL Server:
https://bobj-board.org/t/59650

We also load all metadata from ER Studio (business/techinical metadata). We also load all Informatica mappings.

We have a utility that dumps the CMS repository to a flat file using the BOESDK (this is handy)

The last piece of puzzle is getting all the universe objects that each report is using. This is what I’m working on now.

Metadata integrator (CMS Collector in DI, Metadata Manager) does much of this but we don’t own so is not an option. I’m opening each Webi doc on the server, what I need are these fields:
REPORT_CUID|UNV|QUERYNAME|CLASS|OBJECT

The resultSet object has the fields but not the classes. The other info can be had from the infoObject in CMS. Our object names are not unique, how do i get the class name? there is an ITreeNodes object, I was going to investigate that but haven’t got the time. Any help appreciated!

Regards,

Mark Stockwell, BOCP
see me in Dallas at GBN
http://bocaew.prod.web.sba.com/displaymod/detailevent.cfm?conference_id=2&event_id=306


mstockwell :us: (BOB member since 2006-10-23)

Hi Mark,

Thanks for the pointer but another dead end I think.

You can read all the variable names in the dictionary (which is a big step forward for me) but not their formulas (unless I’m missing something!)

Any other suggestions would be greatfully received.

Cheers,

John


clarej :uk: (BOB member since 2008-01-22)

Also,

I had a quick look at getting the classes for you and I’m pretty sure you can do it from the IDocumentInstance object and the documents dataproviders.

Have a look at :-
myDoc.DataProviders[0].DataSource.Classes.GetChildAt[0].Name

You will have to do some looping. If you get stuck give me a shout and I can send you the code but judging from you initial post it shouldn’t be a problem for you!

Hope this helps.

John


clarej :uk: (BOB member since 2008-01-22)