BusinessObjects Board

Extracting Variabes from a report

Hi Helpers,

A report is crashed and it have more than 10 user defined variables with so many condition is there a way to pull the variables in the report to Excel

Please help I am new to BO and I am using BO 5.1

Regards,
Santhosh


maverickee (BOB member since 2008-01-31)

What do you mean that “report is crashed”? You can’t open it in BO? If you can’t I think there is no way how to get the variables out of it. :nonod:


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

Hi,

When I hit the refresh button I get an execption error and BO closes except refresh I can do all

I have attached the error I am getting

Regards,
Santhosh
BO Errors-Screen Shots.doc (104.0 KB)


maverickee (BOB member since 2008-01-31)

It looks to me that the problem is not with the report but with the temp folder on your PC. Try to delete as much as possible from your temp folder, restart the PC and then try refreshing the report again.

Did it help?


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

everyone is getting this error we tried with 10 different users and locations
I don’t this temp memory ll fix this issue


maverickee (BOB member since 2008-01-31)

So if it’s not working then you can list all document variables (with their formulas) using for example this VBA procedure:

Sub DocVariables()
  Dim i As Integer
  Dim vars As DocumentVariables
  Dim var As DocumentVariable

  Set vars = ActiveDocument.DocumentVariables

  MsgBox "There are " & vars.Count & " variables in the report"

  i = 1
  For i = 1 To vars.Count
    Set var = vars.Item(i)
    Debug.Print "variable " & i & ":" & vbCrLf & _
                "name:" & var.Name & vbCrLf & _
                "formula:" & var.Formula
    Debug.Print ""
  Next i

Set vars = Nothing
Set var = Nothing

End Sub

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

Hi Marek,

You are fantastic I really appreciate your help…

When I first ran the VBA I just got a pop up msg telling there are 65 objects

when I inserted the immediate window I saw all the output in the box

Thanks a lot for your assistance on this

Regards,
Santhosh


maverickee (BOB member since 2008-01-31)

You are welcome.

I am glad it helped. 8)


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

If you are trying to “salvage” the corrupt report, you might find this utility useful …

Copy Data Providers / Copy Report Variables

Copy the data providers from the old to new document first, then you should be able to copy the variables in a second step.


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

can someone advise on the method of running that vba script?


johnwxyz (BOB member since 2008-01-26)

Was there something not clear in the installation and usage instructions … first post in the thread.


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

Hi Marek and Dwayne,

Can you guys tell me how to get the list of all variables provided by Business Objects such as
DocumentVariables,
ActiveDocument.DocumentVariables

that you have used in the utility. I would like to know all the variables exposed by BO so that I can create my own utility. Also, there might be a equivalent class and objects in .NET or Java. Where do I get the complete listing for that??

Would really appreciate your help as these can help me write some very usefull utilities.

Thanks and Regards,
Kashif Ansari


Kashif Ansari :india: (BOB member since 2006-01-16)

Start here … http://devlibrary.businessobjects.com … it will redirect you to an SAP site. Look for the COM SDK for Desktop Intelligence.


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

Thanks aton Dwayne for the quick reply…

Best Regards,
Kashif Ansari


Kashif Ansari :india: (BOB member since 2006-01-16)

What does insert the immediate report means? I tried running it I got the message but thats about it.
Thanks
KC


SKC (BOB member since 2008-11-06)

When you are in Visual Basic editor, press Ctrl+G. It will open Immediate window at the bottom of the editor.


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

What I am currently looking is to (document) list all the variables along with its formulas on multiple reports within a directory. the name that our reports are conditioning has changed in the database which is why I need to see the codes of the user created variables so I can change it. So instead of manually opening hundreds of reports and going through all the variables I can just go through my list and find out which ones need change.
Thanks
KC


SKC (BOB member since 2008-11-06)

Thansk Marek,
I did see the results but it seems like it has the limitation in terms of how many line of data are visible at a time once it was done running. I tried it on a report that had 206 variables. and I can only see from 157 -206. I saw it run but I could not see them all lines. So i guess I want someother means to display the reports… perhaps in an Excel or word.
However I need to run these for hundreds of reports and I wish there is a code that would go through the folders and reports and list it.

Thanks
KC


SKC (BOB member since 2008-11-06)

Give this a try … List report level variables in full client reports


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

Thank you soooo much that worked very well.


SKC (BOB member since 2008-11-06)