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

Apologies in advance for the question, I expecting that I've misunderstood some fundamental & basic concepts.

 

We've got a Stored Process that generates on screen (in a browser, via the Stored Process Web Application) a report that is basically a number of proc prints. We want to be able to automatically save this output to a HTML or PDF document. What I've read in the SP documentation suggests this is possible but all I've been able to find is directions for how to output directly to a file instead of in addition to the on screen output in the web application.

 

Can someone direct me to how I'd do this?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Vince_SAS
Rhodochrosite | Level 12

Try this simple stored process, and be sure to specify the location and name of the PDF file that you want to save:

 

%STPBEGIN()

ods pdf file='specify-location-and-filename-for-PDF-file';

proc print data=sashelp.class; run; quit;

%STPEND()

Vince DelGobbo

SAS R&D

 

View solution in original post

3 REPLIES 3
Vince_SAS
Rhodochrosite | Level 12

I need some clarification about your goals.

 

Do you want the results displayed in the Web browser in HTML format and also have the results automatically saved in a PDF file?

 

Or do you want the results displayed in the Web browser in HTML format and click a button in the HTML to download the results in PDF format?

 

Or something else?

 

Vince DelGobbo

SAS R&D

jamesBFD
Obsidian | Level 7

Ideally I'd need the results displayed in the web browser, as they are now, and then an exact copy of that output saved as a PDF (or HTML file) saved automatically in a folder I've specified.

 

Thanks.

Vince_SAS
Rhodochrosite | Level 12

Try this simple stored process, and be sure to specify the location and name of the PDF file that you want to save:

 

%STPBEGIN()

ods pdf file='specify-location-and-filename-for-PDF-file';

proc print data=sashelp.class; run; quit;

%STPEND()

Vince DelGobbo

SAS R&D

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1610 views
  • 0 likes
  • 2 in conversation