BusinessObjects Board

report metadata

Hi,

I am a new one here and I have a question. Is this possible to import metadata from bo report using sdk? Or maybe to import all metadata from repository?
Or maybe you know some utilities which can do that?
Do you have any documents about repository structure(eg. where is info about queries used in reports)?
Thanks in advance.

Best regards,
Piotrek


ppalka :poland: (BOB member since 2006-01-11)

Hi Piotrek and welcome to B :mrgreen: B,

please have a look at this post at BOB’s download:

For documents about repository structure see the BO install CDs. There should be a folder BO Freeware and HTML page repostry.htm
Or see this post at BOB’s download:


Marek Chladny :slovakia: (BOB member since 2003-11-27)

But this VBA macro unfortunately returns only such info:
Universe, Report Name, Object Name, X
Is there any possibility to change that to return info about queries and transformations used in that report?

Regards,
Piotrek


ppalka :poland: (BOB member since 2006-01-11)

Another one question:
Does VBA SDK allow to connect directly to BO repository? If so how to do that? I would like to process reports not from files, but from repository…

Regards,
Piotrek


ppalka :poland: (BOB member since 2006-01-11)

You can, but why bother. :slight_smile: What I generally do is set up a universe that can be used to connect to the repository. Then in my document I have a query based on that universe, and I use VBA to process (ie loop through) the results in the query. That way I don’t have to do the “messy” stuff like establish a connection, query the rowset, and so on. It’s all handled by BusinessObjects.

Be aware, however, that you will still have to retrieve the document from the repository before you can open / analyze it. You cannot “work” the document while it’s still in the repository. So you might run a query to get a list of documents, then loop through that list. The first step is retrieve, then open, then process.


Dave Rathbun :us: (BOB member since 2002-06-06)

Could you provida some code/example which can do that?


ppalka :poland: (BOB member since 2006-01-11)

Um, no. :slight_smile:

Not to be blunt, but try it yourself first. If you get stuck, ask a specific question. There are some sample universes in BOB’s Downloads that would provide a starting point for you. Use that universe to query the repository and get your list of documents. Once you get that step done, move on to the VBA code. There is a sample on the Integra web site that shows how you can get a list of values for a variable (such as report name). You should be able to use that technique to process the list of report names retrieved by your query.


Dave Rathbun :us: (BOB member since 2002-06-06)

Thanks for your help. I have problem with getting transformation from my reports. How can I do that?
Thanks in advance.


ppalka :poland: (BOB member since 2006-01-11)

HI,

what transformation do you mean? Please be more specific in what you are trying to achieve.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

For example column transformation(eg. column*10)
And I have another question: is that possible to run BO macro without running BO app?


ppalka :poland: (BOB member since 2006-01-11)

You should find the formulas in DocumentVariables collection. Try to list all document variables using the following simple procedure:

Sub DocumentVariablesList()
  For i = 1 To ActiveDocument.DocumentVariables.Count
     MsgBox i & ": " & ActiveDocument.DocumentVariables.Item(i).Name & " " & _
                       ActiveDocument.DocumentVariables.Item(i).Formula
  Next i
End Sub

I am not aware of such possibility. Actually, the BO macro is stored in BO document (either BO report or BO add-in). So first you need to open BO document in BO application and then to run the macro. I see no way how you would do that without opening BO application. :crazy_face:


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Thanks, it is some step forward. But I still can’t figure how to get formulas in proper order. Eg. I put some new column in my report and define it as some formula (for example: Price * 10). And when I am getting metadata, I wish to get metadata for each column in order as I have columns defined.
Is that possible?

Regards,
Piotrek


ppalka :poland: (BOB member since 2006-01-11)

Hmmm, actually I really dont know if this is feasible.
Myabe this post will give you more info/explanation you need.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

It’s a bad new :confused:
Anyway thanks a lot.

Do you think I should try to get that information directly from repository?

Regards,
Piotrek


ppalka :poland: (BOB member since 2006-01-11)

Hi Piotrek,

in the BO repository there is no information about the structure of the BO report. The reports are stored in BO repository in the binary format.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

So where is the info about that structure? Only inside binary file?
As I understand there is no way to get columns in order as they layout in report using VBA?
Maybe you know how to parse report binary file?

Ones again a great thanks.

Piotrek


ppalka :poland: (BOB member since 2006-01-11)

Yes, that’s correct - the structure of the BO report is only in the binary file. No information is in other BO repository tables.

As far as I know, this is not feasible using VBA :nonod:

Nope :nonod: Although I would like to. Or at least I would like to know anyone who knows it. :expressionless:


Marek Chladny :slovakia: (BOB member since 2003-11-27)

There is every possible way to get the report structure and details of the report using java rebean. Just go through the documentation and you can figureit out in no time. It just took me 2 days to do it and I have it. My requirement was for a different purpose alltogether so I can give you a rough outline of guidance.

  1. Login to the repository,
  2. query CI_INFOOBJECTS for getting the required document ids for the reports that you are interested in either by name or by kind,
  3. DocumentInstance report = Webireportengine.openDocument(ID);
    here the webireportengine or as a matter of fact any reportengine depending on the type of document that you are trying to open is to be obtained from the logon attributes.
    From here on you have your required document open, you may want to get to the data provider and get the query or run the query or if the report already has data when it was saved you can get that data too.
    Just try and if you are having trouble look at the sample provided. You can figureout. If you are still having trouble I can help you out with your code.

cheers!!
PJ


pj820 (BOB member since 2005-10-07)

hi Pj,

Does that mean it is possible to get the metadata for Webi report in XI R2 ?

regards
dinesh


dinesh2005 :india: (BOB member since 2005-09-12)

Hi pj820,

This is curios and interesting. The only method for openDocument in ReportEngine I identify is this here:


DocumentInstance openDocument(java.lang.String docName, java.lang.String docID, java.lang.String repoType, java.lang.String docType) 
          Opens a WebIntelligence document. init must be called at least once before openDocument will be called 

Did BO enhance the ReportEngine interface? My understanding is: you can only open .wid etc. doc types with the ReportEngine class. For .rep types you must use WIDocument; which does not offer you much information with view to the metadata.

Regards,
Bernd


BerndB :de: (BOB member since 2006-05-17)