04-04-2011 08:59 AM
04-05-2011 09:42 AM
04-06-2011 12:33 AM
04-06-2011 05:09 PM
04-08-2011 05:33 AM
08-22-2011 09:15 AM
I was facing a similar problem as said by graham above.
I have a summary proc report which is generated first and needs to be displayed to the User.
Then a CSV file containing additional data points needs to be generated where the user will be prompeted to save the file in his desktop.
The problem is that along with the proc report the contents of the CSV are also appearing in the same HTML and a separate prompt for downloading the CSV is not getting generated.
If any one has found a workaround for this then would request you help.
08-26-2011 06:24 AM
If you haven't managed to fix this drop me a line offline (email above...). I'm not working with the stored process server at my current client (yet) but could maybe point you in the right direction if I could see the code.
IIRC, I did something similar to your scenario by separating into 2 stored procs ... First stored proc runs the proc report and then used Don's macro to display a 'Continue' button after the proc report html. (The html in the button runs the second stored process which streams the CSV file ...)
09-21-2011 08:04 PM
I've written a blog post about this as well.
You can simply add the STYLE macro inside the ODS HTML statement as follows:
ods html body=_webout (no_bottom_matter) style=sasweb path=&_tmpcat (url=&_replay);
~ Angela Hall
09-22-2011 02:17 AM
Angela what you have given is helpful but i dont think it would work in my scenario.
Your idea of executing the process again will work but i wish to refrain from doing that.
A sample code that i was aiming at is as below. in my Stored process i have closed the auto generated stored process macros.
*HTML PART START;
ods html body=_webout;
proc print data=sashelp.class;
ods html close;
*HTML PART END;
*CSV PART START;
/* Set HTTP headers */
rc = stpsrv_header('Content-type','application/vnd.ms-excel');
/* Prompt to SAVE or OPEN the attachment file named test.xls using Excel */
rc = stpsrv_header('Content-disposition','attachment; filename=test.csv');
do UNTIL (EOF);
set sashelp.class end=eof;
put @01 name $12.
@17 sex $11.
*CSV PART END;