2 years ago, I posted a method for exporting all of the reports to the file system, using the same folder path. I was never happy with that method, as it required adding a UDF to the content store, and large reports would fail. Since getting these reports was a requirement at one of my clients, I finally had the time to tweak it.
Unlike the previous version, I don’t have access to Oracle, so this is on SQL server. The connection string to the server is handled from inside the script (row 151), all you need to do is change the data source and catalog details to connect.
The reports will be saved under c:\temp\reports. You may want to change that as well (row 244), but don’t forget that windows has an absolute limit in the number of characters in a file path.
Unlike the old version, this will also pull reports from users’ My Folders, including orphaned reports from deleted users. The user reports will be saved under \users\<user name>\my folders\. This will also generate a log file including the sql query sent to the db, and all of the reports generated.
Due to security concerns, the file has been renamed to getreports.vbs.txt. Simply rename that to getreports.vbs to enable it.
I tested this on Cognos 10.2, on SQL Server 2005. If anyone has access to Oracle and wants to adapt the SQL, I’ll gladly amend the post to include it.
getreports.vbs (1639 downloads)
Hi, Paul/ I hope you returned to that blog. After my hard work with this code i’d discovered the next problem. The report (xml report) contains in database (column cmobjprops7.spec) that is not the same report xml when you open report from clipboard. For example I have package named Package1 (version1) and after copy Package1 to Package2 ( and I’d publish Package2 from FM after it) I hope to get inner links in Package2 point onto Package2, but it is not. I should open each report ( more than 200) refresh connect to Package2 and save !!!! (Ha avoda meturefet) . Only after it I get well done reports. Where is the button for clean report cash ?
That’s crazy. I honestly don’t know of any way to batch clean reports like that. I’ve been trying to find a decent way of doing this, but nothing settled yet. I’m actually surprised at this. I’ll see what I can find, no promises sadly.
Hi,
Could you please amend this to support Oracle or Db2 db that would really help me out.
Thanks,
Mani
I don’t have access to an Oracle system, but the SQL should mostly work. You’ll need a recursive function to handle the report paths, but other than that it shouldn’t be a problem.
Wow man! I didn’t use the VBS, but i was looking for a query exactly like this! Thanks a bunch!!! Any bank account I can deposit a million kudos on? 😛