Rather than post the code verbatim, here is an overview of the logic:
1. Connect to the CMS (Thanks Julien!)
2. First Loop - Loop through the three types of reports: Crystal, Webi, Deski
2. Second Loop - Extract the list of reports.
3. Third Loop - Count up the number of instances and calculate the avg runtime.
This macro requires that the BO client software be installed on your PC. VBA macros rely on the Business Objects .dll library files that are installed when the client software is installed.
Is there any limit set on the number of reports? When ever i try to run this report it only give me 2000 records (Report 1000 and WEBI 1000). If so can you please let me know how to change it. I have definitely more than 2000 in total.
Thanks for the heads up on the “bug”. Most likely this is because queries run against the repository have natural limits on them (1000 records seems to be the most common limit). I’ll most likely have to change the select statements in the code to read something like:
SELECT TOP 10000 <something, something> from <tablename> where <conditions>
By adding the “TOP 10000” to queries against the BO SDK, it overrides the limits. I’ll try and get this fixed as soon as I can.
This is an update to the Retrieve Report Statistics Macro. I added the “TOP 10000” to the select statements in the code to prevent the records from being limited to a 1000 records. I’ll update the original post after the file has been updated. Retrieve Report Statistics Macro.zip (16.0 KB)
Make sure you add the “TOP 10000” to the select statements that are pulling the count of instances as well, otherwise it will cap that to 1000 records as well. I have a corrected version of the macro and I’m waiting for it to clear “BOB’s Uploads”.
Does the report in question have any scheduled instances? If not, then I would expect you to get a “0” value for the number of instances, number of recurring instances and Avg Runtime.
Make sure that you are running it on a machine that has the BO client tools installed (Designer, Deski, etc). That will install the proper .dll libraries that the macro needs to run.