Hi,
I'm working on a stored-process that a user will call from the Stored Process Web App, and will specify the _odsdest as pdf or html. Process is running on the Stored Process Server.
As I've been playing with this, it seems like half the time I run it (from internent explorer), the PDF opens in a new IE window. I like that.
But other times I run it, IE pops up a file download box asking me if I want to save do.pdf to my local drive. Less useful. I would like users to see the pdf, then decide whether they want to save it or not.
So how can I force IE to display the pdf? Is this somethig I need to set with stpsrv_header, or do I need to change the SAS results type to be package only (currently both package and streaming are checked). Or do I need to write the pdf file to the server somewhere, and then somehow open it?
Is there a ways I can give a name to the pdf (rather than do.pdf)?
The code is basically:
%global _odsdest;
%stpbegin;
proc print data=sashelp.class;
run;
%stpend;
With user specifying _odsdest=HTML or PDF. And I use Cindy Z's %SetOpts macro to set some of the options, based on output destination.
Maybe I'd be better off going back to good old "ods pdf" / "ods html", rather than using %stpbegin??
Thanks,
-Q.
Hi:
Usually, you need to alter the STPSRV_HEADER to return PDF output using the SAS Stored Process Web App. In my paper, I did not show the use of STPSRV_HEADER because that macro was really only meant to give the general outline of how you would develop one stored process instead of 3 separate stored processes. And, the actual code was only ever submitted from SAS Enterprise Guide -- which did not need to have the STPSRV_HEADER set.
Take a look at the code samples in this Tech Support note. You really would need to set STPSRV_HEADER for ODS PDF as shown here:
http://support.sas.com/kb/12/994.html
cynthia
Hi:
Usually, you need to alter the STPSRV_HEADER to return PDF output using the SAS Stored Process Web App. In my paper, I did not show the use of STPSRV_HEADER because that macro was really only meant to give the general outline of how you would develop one stored process instead of 3 separate stored processes. And, the actual code was only ever submitted from SAS Enterprise Guide -- which did not need to have the STPSRV_HEADER set.
Take a look at the code samples in this Tech Support note. You really would need to set STPSRV_HEADER for ODS PDF as shown here:
http://support.sas.com/kb/12/994.html
cynthia
Thanks Cynthia. STPSRV_HEADER did the trick. Your papers have been a big help as I explore stored processes. And your ODS book holds a treasured space on my desk (I use it too often to bother puting it back on my shelf. : )
--Q.
Hi,
Which book are you talking about? I need to buy one too.
Thanks - Linlin
"Output Delivery System: The Basics and Beyond", by Lauren Hayworth, Cynthia Zendler, and Michele M. Burlew. Really good stuff.
Thank you!!
I believe it is this one:
Haikuo
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.
Ready to level-up your skills? Choose your own adventure.