03-25-2016 02:40 AM
I am using a VBA code in Excel to refresh a SAS VA report, which is generated via SAS VA add-in version 7.1.
However, a pop-up saying "errors occurred downloading the Visual Analytics report that may prevent the entire report from being displayed".
How can the report be opened automatically each time, regardless of errors? (i.e. without need for user to click on "continue" each time)
03-28-2016 12:43 PM
The SAS Add-in for Microsoft Office will not suppress the error messages it generates. We want to alert you to the problem that exists in the SAS Visual Analytics report to explain why it may not display as expected in the SAS Add-in client.
Having said that, you *may* be able to control this in your VBA by using Application.DisplayAlerts=False. See this Microsoft article: https://msdn.microsoft.com/en-us/library/office/ff839782.aspx
03-30-2016 04:26 AM
Many thanks for writing back.
Regarding "Application.DisplayAlerts = False", am afraid it would not work in this case as we need to allow other SAS add-in pop-ups (i.e. database connection, loading report status, etc.)
Goal here is to automate the production of SAS reports via the Excel add-in. Note that issues are expected and we always want to ignore them and continue to produce the report. This will only be possible if we can disable that particular pop-up "errors downloading the report" or find a way to bypass it, automatically click "continue", etc.
03-31-2016 12:59 PM
Dim sas As SASExcelAddIn
Set sas = Application.COMAddIns.Item("SAS.ExcelAddIn").Object
Application.DisplayAlerts = False
Dim report As SASReport2G
Set report = sas.InsertReport2GFromSasFolder("/Shared Data/VA Reports/", Sheet1.Range("A1"))
Application.DisplayAlerts = True
04-03-2016 10:03 PM
Many thanks once again for the follow-up.
Unfortunately, using "Application.displayalerts=false" also prevents SAS add-in dialogs from running (e.g. "running analytics" on a report, "opening report", and other alerts). Preventing these dialogs seems to prevent the report from being processed...
If there are any ways to specifically force the "errors downloading report" dialog box to select "continue", it will be the way to automate this report.
04-06-2016 05:45 PM
I checked with development. The default selection for that dialog box is Postpone not Continue. Using Application.DisplayAlerts=False is the same as clicking Postpone and would not allow the VA report to load with errors.