BusinessObjects Board

List of objects used in report..

Hi I am trying to implement the VBA code originally from Dave,
Code is here: List Objects Used in a set of Documents

When I run the macro it is giving a compilation error. It is not accepting the GLOBAL declaration.
Iam not good in VBA.
Can anybody advise me in declaring a variables…I tried PUBLIC,
Thanks in advance,
John


john_ed (BOB member since 2004-09-08)

I just copied Dave’s code into a blank report and it compiled just fine.

That said, this utility that I presented at the User Conference last year that offers an alternative approach to Dave’s code. Instead of writing out to text file, the information is recorded in a VBA data provider of a BusObj document. That way you have all of the reporting capabilities of BusObj. You may also have some interest in the code itself as an “academic” exercise.


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

Thanks Dwayne for the reply and info…I’ve not tried your code yet, but just want to Describe you the error:
it says,

Compile Error:
Constants, fixed-length strings,arrays,user defined types and declare statements are not allowed as public members of object modules.

This happens when I copy the code as it is and paste it. At “GLOBAL Const ErrNum as Integer =1” automatically turns red giving a syntax error.

Iam using BO6.1.3…Do i need to add any references in order to work on Dave’s Code??

thanks,
John


john_ed (BOB member since 2004-09-08)

Don’t place the code in the ThisDocument Module. Create a new module (Insert, Module) and place the code there.


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

Thanks again,
Yes, I was doing that mistake. It is working now, and creating a .csv file. But it has only Headings, no objects or its related data. But i guess I can work on it…error log says, the Log file/csv file not found…Thanks

John


john_ed (BOB member since 2004-09-08)

Hi Dwayne,

Thanks a lot for this doc ! There are also conditions !
so that is the useful answer to this post. :wink:

Regards

Dwayne,

I’ve just downloaded your List Objects Used report, but when I refresh it I get the following error:

Run-time error (13):
Type mismatch

It occurs on line: Set dpCube = DefineCube(dpInterface.DpVBACubes(1))

Can you help?
I know virtually nothing about VBA.

Many thanks…


anorak :uk: (BOB member since 2002-09-13)

Can you run any other VBA code? My suspicions would be inadequate Supervisor privileges.


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

Dwayne,

I’ve managed to get it to work!

I don’t know why I did it, but I deleted (1) from Set dpCube = DefineCube(dpInterface.DpVBACubes(1)) and ran the script. It failed, so I reinput (1). When I ran the script again there was a message about changing the project, but this time it worked!

I’ve no idea why it now works, maybe you have? Anyway, the bottom line is that it really is a most useful report, so many thanks for this.

If we want to add the SQL for each object to the report, we can run a query against the repository, and link the two queries on Object Name. However, could this be done by adding to the VB script?

Many thanks once again.


anorak :uk: (BOB member since 2002-09-13)

I can’t answer the first portion, but hey it works now so I guess it doesn’t matter.

As far as the second question, take a look at this post.


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

Hi Dwayne,

I have downloaded this report utility from BOB and am trying to execute the report as per the instructions. For testing purpose i have kept 5 BO rep files in a temp folder and the List Objects Used.rep report.

Upon refreshing BO throws the unhandled exception error moreover on the other hand is some kind of customisation is required to be done to the vb macro code regarding location of the folder?

Regards,
Sag.


sagarghamandi (BOB member since 2004-08-26)