BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rmedlin
Fluorite | Level 6

Hi Developers,

 

I originally posted this question on the SAS Blogs site:

 

https://blogs.sas.com/content/sgf/2018/10/31/sas-viya-rest-apis-to-access-images-from-sas-visual-ana...

 

The author suggested that I post here as well.

 

My company has a series of Viya dashboards that we are currently importing into Powerpoint using the SAS MS Office Add In. The process is very labor intensive and sometimes gets stuck if network traffic is high.  Also, the data doesn't always line up correctly and requires lots of manual adjustment.

 

I'd like to export these reports from Viya using API calls. Ideally, we'd be able to use a pre-existing Powerpoint template, but I'll settle for just the export.  I've already found API calls that will return the report name, id, path, and other data elements.  But exporting the text and images is another matter.

 

One of the dashboards in question has parameters. So I was hoping to pass, for example, a health plan id to the dashboard, run it, and then export the results.  Any input would be welcome.

 

Rick Medlin

1 ACCEPTED SOLUTION

Accepted Solutions
joeFurbee
Community Manager

Hi @rmedlin,

Sorry for the delayed response. Hopefully, you'll find this helpful.

 

First, I know you're working with ppt here, but you may want to look into the VA SDK. Perhaps there are some nuggets you could pull from there for your reports? There is also the JobExecution web application. Again, not exactly fitting your use case, but it may be a direction you wish to explore. There is a TON of examples of the JES here in the Community.

 

Moving on, I worked with @lucasdepaula  and we dug up some code from @BrunoMueller. The result is a SAS program which exports SAS report objects and creates a PowerPoint file. I loaded the code onto GitHub so it would be available to everyone. I'm still working on usage notes, but it may be a good test to see what's clear (and not) in it's current state.

 

Please take a look and let me know if you need further guidance to get the code working. Lucas and I are available to walk you through it.

 

Thanks,
Joe


Join us for SAS Community Trivia
SAS Bowl XXXVIII, SAS Programming: Getting Started
Wednesday, February 14, 2024, at 10 a.m. ET | #SASBowl

View solution in original post

7 REPLIES 7
joeFurbee
Community Manager

Hi @rmedlin,

I wanted to provide an update.

 

I'm working through this with a couple of colleagues. We're close to completing a solution, but have a couple more things to iron out. I'll provide an update when we've got something working end-to-end.


Join us for SAS Community Trivia
SAS Bowl XXXVIII, SAS Programming: Getting Started
Wednesday, February 14, 2024, at 10 a.m. ET | #SASBowl

rmedlin
Fluorite | Level 6
Thanks, Joe. I really appreciate everyone's efforts.
rmedlin
Fluorite | Level 6

Just poking this thread to see if there are any updates.

joeFurbee
Community Manager

Hi @rmedlin,

Sorry for the delayed response. Hopefully, you'll find this helpful.

 

First, I know you're working with ppt here, but you may want to look into the VA SDK. Perhaps there are some nuggets you could pull from there for your reports? There is also the JobExecution web application. Again, not exactly fitting your use case, but it may be a direction you wish to explore. There is a TON of examples of the JES here in the Community.

 

Moving on, I worked with @lucasdepaula  and we dug up some code from @BrunoMueller. The result is a SAS program which exports SAS report objects and creates a PowerPoint file. I loaded the code onto GitHub so it would be available to everyone. I'm still working on usage notes, but it may be a good test to see what's clear (and not) in it's current state.

 

Please take a look and let me know if you need further guidance to get the code working. Lucas and I are available to walk you through it.

 

Thanks,
Joe


Join us for SAS Community Trivia
SAS Bowl XXXVIII, SAS Programming: Getting Started
Wednesday, February 14, 2024, at 10 a.m. ET | #SASBowl

rmedlin
Fluorite | Level 6
I attended your webinar this morning on using API's. In that session you showed some code that exports Viya reports to Powerpoint. Please let me know when that webinar transcript and the code is posted on Github. Thanks!
joeFurbee
Community Manager

Hi @rmedlin,

Thanks for attending the webinar. Here is a link to the webinar recap, with links to the code on GitHub. Additionally, you may want to read a post by my colleague @Cindy_WangProgrammatically export a Visual Analytics report to PDF.

 

Join us for SAS Community Trivia
SAS Bowl XXXVIII, SAS Programming: Getting Started
Wednesday, February 14, 2024, at 10 a.m. ET | #SASBowl

rmedlin
Fluorite | Level 6

Hi Joe,

 

I tried your excellent looking code as well a Cindy's but I usually get an error along these lines:

 

{"errorCode":0,"message":"The file could not be found.","details":["traceId: ebeb3a5e35e8d2c2","path: /files/files/bc6ae404-a5df-41a2-b245-01731616ccee/content"],"links":[],"version":2,"httpStatusCode":404}

 

I assume that means there is a configuration issue on the server side, but neither I nor our SAS admin can figure out what it is. Any insight you might have would be appreciated.

 

Rick

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 2620 views
  • 1 like
  • 2 in conversation