Hi, I played with this a bit, but wasn't successful. : ) I was thinking to just write the PDF and Excel file to work directory, then stream them back to the user. I was playing with something like: ods tagsets.excelxp file="%sysfunc(pathname(work))/myExcel.xls";
proc print data=sashelp.class;
run;
ods tagsets.excelxp close;
ods pdf file="%sysfunc(pathname(work))/MyPDF.pdf";
proc print data=sashelp.shoes;
run;
ods pdf close;
data _null_;
file _webout (no_bottom_matter);
infile "%sysfunc(pathname(work))/myExcel.xls";
if _n_ = 1 then do;
rc = stpsrv_header('Content-type','application/vnd.ms-excel');
rc = stpsrv_header('Content-disposition',"attachment; filename=MyExcel.xls");
end;
input ;
put _infile_;
run;
data _null_;
file _webout (no_top_matter) recfm=s;
infile "%sysfunc(pathname(work))/MyPDF.pdf" recfm=n;
if _n_ = 1 then do;
rc = stpsrv_header('Content-type','application/pdf');
rc = stpsrv_header('Content-disposition',"attachment; filename=MyPDF.pdf");
end;
input c $char1.;
put c $char1. @@;
run;
But that doesn't work, I suspect for a number of reasons. Basically trying to send two posts (?) back to the browser. And not allowed 2 different headers. Even when I tried just 2 pdf files, couldn't get it working. Looks like no_bottom_matter can't be used with file _webout ??? Anyway, despite my lack of success, I think if you are willing to keep the approach of having 2 different stored processes, something like above might work, if you use sessions. So the first stored process writes the 2 reports to work dir, and streams back the Excel file. The second stored proecss connects to the same session as the first stored process (so can see the 2 reports in the work dir), and streams the pdf file back to the user. It's just a thought, I haven't played with sessions yet. Hopefully something in this will help, or perhaps encourage someone else to jump in. --Q. .
... View more