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)
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
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.
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
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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.