BookmarkSubscribeRSS Feed
Fluorite | Level 6

Hi Again,


I'm a relative newbie with SAS Viya and just starting using the VA SDK.


Here's my previous question on the matter where I was directed to the SDK, which I thin is the best solution:


What I'm trying to do is to take an existing report/dashboard that was created by another user and export it programmatically, probably to PDF.  This is what I've pieced together through research:


<script async src=""></scrip...>
html {
background-color: #f0f0f0;
sas-report {
width: 75%;
height: 75%;
--sas-report-padding: 10px;
display: block;


The documentation for VA SDK says that an "HTML document" is required.  I was hopeful that I could just create a new job in Viya and use the HTML form associated with the job as a document and UI.


But the response is 'Object not found':




Any input would be appreciated.


SAS Employee

Hi @rmedlin,

The error you showed seems to be that the Job execution can not find the resulting content (html page?) to display, resulting in that error.  So that in itself has nothing to do with the Visual Analytics SDK.  @joeFurbee, maybe you can help direct this aspect of the problem.


Now back to what you are trying to achieve, I'm a bit confused on exactly what it is you are doing?  Are you using Viya Jobs for the sole purpose of hosting an html page that contains the SDK?  I assume this would work, but I've never seen that done.  Usually one would just write HTML and JavaScript directly to utilize the SDK and host that page on a web server.  Also, you mention exporting the report to PDF. Is your intention to use the SDK not for display, but only to cal the exportToPDF api?

Fluorite | Level 6
Yes, I'd like to use the HTML form in the Viya job to display the report in question and then allow the user export it to PDF. Currently, we're using the SAS Add In for PowerPoint to import the data and it takes forever. @joeFurbee is familiar with my previous attempt and posts.

I don't know if it can be done, either. I tried the code in a plain HTML document and it didn't work, so I figured that an HTML form associated with a job might work better. Thanks for your response.
Community Manager

Hi @rmedlin

To address the 'Object not found' error, have you tried to run the straight API call for the report? Something like:

curl -X GET  \ -H 'Accept: application/'





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

SAS Employee

@joeFurbee and @rmedlin,


What 'Object not found' error is being referred to here?  In the original post it mentioned this, but then showed the error coming from the Job, which was "The file could not be found", referencing /files/files/{uid}/content.  When a Job runs it's output gets placed in under /files, which I think is what is being referenced here.  That has nothing to do with the report object.

@rmedlin, you mentioned not being able to get the VASDK working with a static HTML page, so then trying it through a Viya Job.  Adding a Job into the mix is only going to complicate things, so my advice would be first to get a working static example of the VASDK working.  What errors were you getting when trying to use the VASDK?  Most problems occur due to improper or incomplete configuration of Viya.  Did you follow the instructions here,

Fluorite | Level 6

@BradMorris , I'm not the SAS admin for our organization, but I will ask the person who did the SDK deployment.  Thank you.


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
  • 5 replies
  • 3 in conversation