BusinessObjects Board

Macro

Hi All,

This is my first post to BOB.Please appologize for any inconvinience if my message is not to the standards expected.

I am completely new to writing macros,but I need to write a macro which can populate the following and put the result in excel sheet.

The following to collect with macro:

For each bo report , collect
Report name
Data provider(s) name
Universe(s) name
Object name/id
SQL Expression

can somebody please help me out writing the code?Though I see the code to copy the dp’s but again I am looking for something where the code can get all of the above at one place i.e into excel.

I hope I am making things clear!!

Thanks in Advance
vinni


sgummadi (BOB member since 2007-01-31)

Hi,

this perhaps: https://bobj-board.org/t/60568

Regards,

Gerard


highandstoned :netherlands: (BOB member since 2005-08-01)

Hi Gerard,

Thanks much for the prompt reply!!you got me almost there to what exactly I am looking for.

I will continue working on the rest to write the code to get the sql behind the objects pulled in query panel.

Hopefully something should work out for me!:!:

Thanks a ton,
Vinni


sgummadi (BOB member since 2007-01-31)

Hi,

forgot to type: welcome to B:mrgreen:B!

The rest of the code is probably somewhere in the SDk forum, Try a little searching, if you have a specific question you can post it.

Regards and good luck,

Gerard


highandstoned :netherlands: (BOB member since 2005-08-01)

Hi All,

Earlier I could get the macro code to run against the reports stored locally in a folder to get the list of objects in a data provider

But now instead of local the macro should go against the corporate douments and retrieve the same info as it did for local documents.

My question is where I should put the following code in the macro to get the desired result.

Application.ExchangeMode = boRepositoryMode
Call Application.Documents.Receive(RepFile, PathName)
Set Doc = Application.Documents.Open(PathName & RepFile)

Again I am newbie to VB so when tried to modify it is breaking:(,Please help me in acheiving it.

Thanks in advance
Vinni


sgummadi (BOB member since 2007-01-31)

I think you need to add another sub (subroutine) to first retrieve all (or selected) coprorate documents and save them to the same folder as that document from Dwayne.
And the end of that subroutine youl probably just need activedocument.Refresh

Regardsm

Gerard


highandstoned :netherlands: (BOB member since 2005-08-01)

Hi Gerard,

Here is the Code I found from BOB to retrieve the corporate documents from the repository:

Dim BOApp As busobj.Application
Dim bodocs As busobj.Documents
Dim Document1 As busobj.Document

Set BOApp = busobj.Application
Set bodocs = BOApp.Documents
Set Document1 = bodocs.OpenFromEnterprise(“empgroup PROD Xi”, “EmpGrp”, boFolder)

Document1.Refresh
Document1.PrintOut
Dim file_name As String
file_name = “\xxx-dept\Egr” + empname + " " + CStr(Format(Date, “yyyymmdd”))
Document1.SaveAs (file_name)

Set bodocs = Nothing
Set Document1 = Nothing

My requirement is to get the all the corporate docs from the repository and save it to the user docs locally.As far as my knowledge goes I guess it is retriving only one doc but I need multiple.Please help me with the code.

I am looking for somehting generalized form of above code,specifying the source and destination ,so that I can tie with the Dwayne code.

Thanks much,
vinni


sgummadi (BOB member since 2007-01-31)

when i run the code iam getting an error “activex cant be loaded”


Rajasekar :india: (BOB member since 2004-07-16)

@rsekar: check the references in VB. Did you use the correct version (Xi/6.5) ?

@sgummadi: I can’t find code to retrieve the corporate document list (well, not directly with BO VBA objects). The only thing I can find is people using hard coded document lists. The other which would work on 6.5 is read the database but it looks like you’re on Xi so that doesn’t work if I’m correct.
And I don’t have Xi to test here…sorry.

Regards,

Gerard


highandstoned :netherlands: (BOB member since 2005-08-01)

I have both BO6.X and XI.Now i have uninstalled BO6.X Version.I have added the reference of BOXIR2.Even though i am getting the same error.


Rajasekar :india: (BOB member since 2004-07-16)

@rsekar: you should gave started a new topic since this has nothing to do with this topic. Or contact Dwayne, he seems to be the author of the code.
Try debuging it step for step, which object fails to create ?


highandstoned :netherlands: (BOB member since 2005-08-01)

It won’t help :nonod:. The full client SDK doesn’t support getting a “listing” of corporate documents, sorry.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Thanks much Dwayne and Gerard for getting me upto this point.I did see that hard coding for the document names to get the list but again it does not solve the purpose.I found this in my search so is this URL can get my job done?or am I going out of way?

Also I read in the BOB forums that it is not possible to get the object id/Internal id for the object using report SDK,there was something like ‘ID’ in hidden in the object class under Designer SDk to get that object info.My question if it is hidden how can I use that in coding?Any thoughts or ideas please?

Thanks much
Vinni


sgummadi (BOB member since 2007-01-31)

The coding given in the url works for version 6.5 and earlier, so it depends on what version you’re on. I believe you can’t read the database anymore on Xi but I haven’t done any work on that.

The same goes for the object id, it’s there in the repository tables for 6.5 and earlier.

Regards,

Gerard


highandstoned :netherlands: (BOB member since 2005-08-01)

Thanks Gerard for the Prompt reply.I am using 6.5.So can I use the code safely to import the docs from the repository?

Also can you assist me in getting the objectid info for the objects in the universe.I tried to write code but ID is hidden under object class ,it is not visible to put in the code.Any thoughts please?

Thanks,
–Vinni


sgummadi (BOB member since 2007-01-31)