BookmarkSubscribeRSS Feed
PGDB
Calcite | Level 5

All,

 

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)

 

Thank you!


SAS_VA_error.jpg
5 REPLIES 5
fifthand57th
SAS Employee

Hi,

 

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

 

 

 

PGDB
Calcite | Level 5

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.

 

Cheers.

fifthand57th
SAS Employee

Suggestion:

 

Sub InsertReport2GFromSASFolder()

    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


End Sub

 

PGDB
Calcite | Level 5

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.

 

Cheers.

fifthand57th
SAS Employee

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. 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 5 replies
  • 2310 views
  • 0 likes
  • 2 in conversation