The SAS Output Delivery System and reporting techniques

Print Duplex ODS HTML

Reply
Frequent Contributor
Posts: 83

Print Duplex ODS HTML

I have the following code and I would like it to print two-sided duplex. Please help

proc template;
define tagset tagsets.test;
parent=tagsets.htmlcss;
define event doc;
start:
put ' put 'xmlns:x="urn:schemas-microsoft-comSmiley Surprisedffice:excel">' NL;
finish:
put "" NL;
end;
define event doc_head;
start:
put "" NL;
put VALUE NL;
put "" NL;
finish:
put "" NL;
put "" NL;
end;
end;
run;

ODS LISTING CLOSE;

ODS MARKUP file=_WEBOUT tagset=tagsets.test
headtext= '';

PROC REPORT DATA=WORK.QUERY2_for_QUERY8665 NOWD
RUN;

ODS MARKUP close; Message was edited by: LAtwood
SAS Super FREQ
Posts: 8,744

Re: Print Duplex ODS HTML

Hi:
I wonder whether your _WEBOUT reference means that you are returning these results to a browser and then are going to use a "helper" application to launch Excel to open the HTML file???

If this is the case, then I also wonder why you are not using TAGSETS.MSOFFICE2K or TAGSETS.MSOFFICE2K_X or TAGSETS.EXCELXP to send your HTML or XML reports to Excel.

As for printing control, there has to be a way in the markup language to do what you want to do. So, for example, in the HTML - -specific to Excel -- if I want to do something and verify that it will work, I do this:
1) go to Excel -- type some numbers in a worksheet
2) make all the changes and header and footer and print options I want
3) save the file as either HTML, MHTM or 2003 Spreadsheet XML (this is important) do NOT save the file as a plain old XLS or XLSX because you want to see whether there is an HTML way or an XML way to do what you want
4) open the saved file with Notepad and look for the tags or CSS or controls for the change you made
5) if you are using ODS TAGSETS.EXCELXP or ODS TAGSETS.MSOFFICE2K_X -- look to see whether there's a suboption for the type of tag you need to generate ... for example, using the doc='Help' suboption will show you what print-related options are available.

If you find in #4, that the print option you set does NOT get put into the HTML or XML file, then this means that you have picked an option or setting that can only be done from inside Excel.

If you find the options/setting you want in #4, but you do NOT find the option or setting available to you in #5, when you investigate the default output, then and only then is it time to write your own tagset template.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 133 views
  • 0 likes
  • 2 in conversation