BusinessObjects Board

List objects used in Web Intelligence reports

Hi All,

Based on the below code which I had created earlier, with the help of my team I have created a utility(with UI) which would generate the Report dump into .xls in one click.

Utility is of size 17MB and you can download it from the below location:-
https://drive.google.com/folderview?id=0B1uumRTyou6KWW45TjhnZFJLMEU&usp=sharing

Currently, the utility is running fine with Enterprise credentials.

Please check the same and let me know if you find any issues.

Regards,
Rupesh

To get the list objects used in Web Intelligence reports, a Java code has been built which would pull the below information in the text file:-
• Report Name
• Folder Full Path
• Report ID
• DataProvider Name
• Universe/Source
• Has Combined Queries in DataProvider
• Number of Result Objects/Condition objects in DataProvider
• Class Name
• Object Name
• Operands
Attached java code would consider all the reports present in the repository (Favorites and Public Folders). If a particular folder or reports to be considered then need to do respective changes in the query ( Eg:- select SI_NAME, SI_ID from CI_INFOOBJECTS Where SI_Kind=‘Webi’ would retrieve all the Webi reports present in the repository. We can have some extra condition in the query if required. For example: SI_NAME).

For more information please go through the comments mentioned in the Java Code.

Please use the below steps to get the final dump in an excel sheet:-
– Select the environment to run (do the respective changes in the code)
– A Text file would be created under C:\repdump{todays date} (if required, folder location can be changed in the code)
– Change the extension of the file(.txt) to .doc
– Open the .doc file and hit CTR+H, replace ^013(new line value) with empty.Reason: To make sure that there shouldn’t be any new line values in the file
– Also replace ^t (tab value) with empty.Reason: To make sure that there shouldn’t be any tab values in the file
– Replace *** with ^013(new line). *** is used as a delimiter to divide the entries of each row
– Change the extension of the file to .xls
– Go to data->Text to Columns->Delimited ->choose # as delimiter
– Save the excel file

Note:
Attaching a Document which contains the screenshots to Configure Eclipse to run BO Java codes.
BO and Eclipse.zip (999.0 KB)
ListObjectsUsedWebI_V1.2.txt (9.0 KB)


Rupesh G (BOB member since 2009-10-22)

1 Like

Hi All,

While i was testing the code- if found one exception and i have fixed it.
The exception was with fetching number of condition objects in the code.
To handle this i just added if(query.hasCondition()) block in the code.

Pleas find the updated version of the code and let me know if there any issues, so that i can fix it and will update the same.

Also, attaching sample output of the dump (excel format).

Note:
To debug the code, you can add System.out.println(“message/variable”) in the code which would be easy to fix if there is any issue.

Thanks,
Rupesh
ListObjectsUsedWebI_V1.1.txt (7.0 KB)


Rupesh G (BOB member since 2009-10-22)

1 Like

Attaching Sample output Webi Report dump.

Thanks,
Rupesh
Sample Output.zip (22.0 KB)


Rupesh G (BOB member since 2009-10-22)

1 Like

Rupesh, I’m looking into extracting the objects and variables used in my report but I’m not that technical minded.

What do I need to do to follow your instructions?


KA_Analyst :uk: (BOB member since 2009-02-24)

I am trying to excrete the objects from the Webi reports but I am not unable to do so. I am not getting anything back when I open the excel document. Can you please let me know how to use this code? Thanks for your help.


nychiller786 (BOB member since 2010-02-22)

Hi,

There are few exceptions in the code ( Query condition nodes, sub-query conditons, rank, combined queries).

Currently, i’m working to eliminate these exceptions.
I would post the code once i’m done with and also, i will provide a doc which contains a screen-shots on how to execute a java code using Eclipse IDE.

Thanks,
Rupesh


Rupesh G (BOB member since 2009-10-22)

I would really appreciate it, if you can provide the code once you done, It is kind a urgent requirements we have from the client. Thanks for your reply.


nychiller786 (BOB member since 2010-02-22)

I have updated the java code(ListObjectsUsedWebI_V1.2.txt)

Please note that while taking report dump, do not include the reports having DB ranking at DataProvider level (as i have not included in the code to handle,so it will thrown an error). Remaining exceptions which i have mentioned earlier have been fixed.

Do let me know if any exceptions.

Thanks,
Rupesh
ListObjectsUsedWebI_V1.2.txt (9.0 KB)


Rupesh G (BOB member since 2009-10-22)

1 Like

Thanks for providing the code, I have a question regarding the code, do I need to run the code in Eclipse IDE?


nychiller786 (BOB member since 2010-02-22)

Yes , run the code using eclipse IDE. In the code mention either report ids or report names(Si_ID,SI_NAME).


Rupesh G (BOB member since 2009-10-22)

I am getting an errors while running the code, Can you please find the attached screen shot. Let me know the steps how to resolve this issue. Thanks for your help.


nychiller786 (BOB member since 2010-02-22)

Unable to see the attachment


Rupesh G (BOB member since 2009-10-22)

Make sure that class name and java file name is same. Give all the required credentials and environment details in the code.


Rupesh G (BOB member since 2009-10-22)

Yes, the class name and the java code are same. Can you please find the attached file?


nychiller786 (BOB member since 2010-02-22)

The code seems to be working now; however I am getting some other error now.
Today. toString 20120125
Logged in…!
Not a valid query. (FWB 00025)

Session logged off


nychiller786 (BOB member since 2010-02-22)

The coding is working!!!, but i am unable to view the reports objects in the output.

Today. toString 20120125
Logged in…!
Test…!!
Test
New Web Intelligence Document
Session logged off


nychiller786 (BOB member since 2010-02-22)

Earlier, You have not given the query format correctly. It should be in the format as follows: select si_id,si_name from ci_infoobjects where si_kind=‘webi’ and si_id in (‘8534’,‘4567’,‘4568’). In this example, i have given 3 report ids. Also, you can verify the select query by running it in query builder. 2) A text file would be created under c:\repdump\ {todays date} . I have given the detail steps earlier in this thread to conver the text file to excel file. Please refer to the steps i have mentioned.


Rupesh G (BOB member since 2009-10-22)

The code is working fine, I did able to find the c:\repdump\ file. However I am having some issues while converting the file into excel, I know you have provided the details earlier, but I am missing something. Can you please find the attached file? Thanks again to providing the code!!!
20120125.txt (20.0 KB)


nychiller786 (BOB member since 2010-02-22)

1 Like

Hi,

Please do the following change in windows:-
Folder Option->View->Uncheck ‘Hide Extensions for known file types’.

Steps:- ( I have already mentioned the steps at starting of this thread)
– Change the extension of the file(.txt) to .doc
– Open the .doc file and hit CTR+H, replace ^013(new line value) with empty.Reason: To make sure that there shouldn’t be any new line values in the file
– Also replace ^t (tab value) with empty.Reason: To make sure that there shouldn’t be any tab values in the file
– Replace *** with ^013(new line). *** is used as a delimiter to divide the entries of each row
– Change the extension of the file to .xls
– Go to data->Text to Columns->Delimited ->choose # as delimiter
– Save the excel file

I have converted the .txt file to .xls file for you.Please find the attached file.
Check the same and let me know if you need any further help.

Thanks,
Rupesh
20120125.zip (1.0 KB)


Rupesh G (BOB member since 2009-10-22)

1 Like

Thanks Rupesh for the code.
I tried to run it and I am getting XXXXXX:6400 not found or server may be down (FWM 01003). However when I connect to query builder using the same parameters, it works fine. Does my client PC needs special permission to be able to talk to CMS server using SDK ?


boomrang (BOB member since 2012-03-08)