BookmarkSubscribeRSS Feed
sorosch
Fluorite | Level 6

Hello,

 

i have a datastep that opens _WEBOUT

 

data _NULL_;
  set webOutput;
  file _WEBOUT;
  put l;
run;

In the "data webOutput(keep = l);" Step i create HTML which has serveral dropdown-menues and a button on the top of the page. The rest of the page is an iframe which has a table, generated by an proc tabulate.

 

Now i want to export this table to PDF. So i created in a macro an ods-statement, that creates a pdf:

 

		  	ods pdf file='/mypdf.pdf';
		  	%proc_tabulate_code;
		  	ods pdf close;	

But how can i forward the PDF to the browser? I have found some examples - e.g.:

 

data _null_;
rc = stpsrv_header('Content-type','application/pdf');
rc =
stpsrv_header('Content-disposition','attachment; filename=temp.pdf');
run;

ods listing close;

ods PDF  body=_webout ;

proc print data=sashelp.class;
run;

ODS PDF  CLOSE;

But always the PDF is shown on the HTML-Page or in the STP-Log as Binary-Code.

 

Already clear why (the PDF is written to _webout - and _webout is already open) - But how can i close _webout? Or what other possibilities exists?

 

Thank you very much

Kind regards

George

1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
If this is a stored process question or a SAS/IntrNet question, then you might want to post the question in the Stored Process Community https://communities.sas.com/t5/SAS-Stored-Processes/bd-p/sas_stored_processes or open a track with Tech Support.

Cynthia

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 1 reply
  • 406 views
  • 0 likes
  • 2 in conversation