Reportbuilder : Add VBA support to trigger data refresh from a macro

Avatar

Avatar

nicolas_aucher

Avatar

nicolas_aucher

nicolas_aucher

07-03-2012

ReportBuilder is a great tool to have automated reports but is lacking a feature to make the automated report more powerful : make the data refresh part of a larger macro that can eventually render the final report more complete and then sky is the limit with what you can do. Obviously that feature would only apply for people refreshing their data locally (since macros will not run from the Adobe Reportbuilder servers for scheduled reports).

 

Example: integrate the ReportBuilder data refresh in a larger process that refreshes pivot tables, sort data, make external database connection to retrieve additional data (...). These macros can then do the little things to make a great report (e.g. only display the top bounce rates for pages that have more than xxx entries, merge natural/paid search keyword data in a single table, add external data like number of clients/accounts in database to compare with the additional clients from SiteCatalyst report)... The goal is to minimise all manual work to get the dahsboard that people need as with too many manual steps, people just either waste their time or don't do the task and have to cope with a sub-optimal report.

 

It is important to note that this exact same feature was available with ExcelClient (it was possible to trigger data refresh using VBA and query table refresh), so this feature request is essentially to get back a feature that was available with Excel Client...

9 Comments (9 New)
9 Comments

Avatar

Avatar

lsschultze

Avatar

lsschultze

lsschultze

10-05-2012

Agree 100%.  I was going to request this very thing.  Maybe it is possible to expose the guts of Reportbuilder through a VBA API that would allow calls to its internal library of functions. 

Avatar

Avatar

leslie16

Avatar

leslie16

leslie16

24-09-2012

Absolutely Agree!

Avatar

Avatar

keithmacd

Avatar

keithmacd

keithmacd

12-12-2012

Hear hear!

 

I love the requestor's idea but I'll suggest an alternate approach:  allow data refresh to be invoked by an Excel cell value.

 

In other words, let the user create a dependent request (functionality which already exists) but instead of depending on another data block, it depends on an Excel cell.  If A1 = true then refresh, else don't refresh.

 

That might be a quick n dirty way to accommodate the do-it-yourselfers while not incurring too much dev cost for Adobe.

 

I'd still love to see ReportBuilder methods made available in VBA though.

Avatar

Avatar

bige938007

Avatar

bige938007

bige938007

04-03-2013

Basic VBA integration functions are currently under development and will be introduced in the coming weeks.

Avatar

Avatar

bige938007

Avatar

bige938007

bige938007

14-03-2013

This comment will be long and technical in nature but will hopefully provide a sneak preview of what you will be able to do from VBA in Excel with ReportBuilder:

 

Prerequisite: the user needs to have logged into ARB before invoking the any of the following macros functions. 1) The following macro will refresh all ARB requests in the Active workbook. Sub RefreshAllReportBuilderRequests() Dim addIn As COMAddIn Dim automationObject As Object Dim success As Boolean 'First step is to invoke the ReportBuilder COM Addin through its Product ID Set addIn = Application.COMAddIns("ReportBuilderAddIn.Connect") Set automationObject = addIn.Object ' Once the Addin has been retrieved, invoke the RefreshAllRequests() API command success = automationObject.RefreshAllRequests(ActiveWorkbook) End Sub 2) The following macro will refresh all ARB requests in the Active worksheet Sub RefreshAllReportBuilderRequestsInActiveWorksheet() Dim addIn As COMAddIn Dim automationObject As Object Dim success As Boolean 'First step is to invoke the ReportBuilder COM Addin through its Product ID Set addIn = Application.COMAddIns("ReportBuilderAddIn.Connect") Set automationObject = addIn.Object ' Once the Addin has been retrieved, invoke the RefreshWorksheetRequests() API command success = automationObject.RefreshWorksheetRequests(ActiveWorkbook.ActiveSheet) ' The RefreshWorksheetRequests() API call take a worksheet object as an argument. ' Thus you can call if for any worksheet that contains ARB requests. End Sub 3) The following macro refreshes all ARB requests whose cell outputs intersect the  a specified range of cells Sub RefreshAllReportBuilderRequestsInCellsRange() Dim addIn As COMAddIn Dim automationObject As Object Dim success As Boolean 'First step is to invoke the ReportBuilder COM Addin through its Product ID Set addIn = Application.COMAddIns("ReportBuilderAddIn.Connect") Set automationObject = addIn.Object ' Once the Addin has been retrieved, invoke the RefreshRequestsInCellsRange() API command ' The cell range specified below points to the range B1:B54 of the "Data" worksheet of the active workbook. ' The range expression will support all supported Excel Range expression success = automationObject.RefreshRequestsInCellsRange("'Data'!B1:B54") End Sub

Avatar

Avatar

nicolas_aucher

Avatar

nicolas_aucher

nicolas_aucher

18-03-2013

That is perfect : exactly what i needed. When will that be available ?

Avatar

Avatar

bige938007

Avatar

bige938007

bige938007

19-03-2013

Within the next few weeks! I will update the status of the idea as soon as it's available.

Avatar

Avatar

bige938007

Avatar

bige938007

bige938007

21-03-2013

Avatar

Avatar

bige938007

Avatar

bige938007

bige938007

10-04-2013

An alternative command that can be used to refresh the worksheet's requests in case you experience problems with the aforementioned code samples:

 

Application.CommandBars("Adobe ReportBuilder Toolbar").Controls("Refresh").Execute