28.09.2013 Views

SAS and Lotus Notes, an ideal combination for ... - sasCommunity

SAS and Lotus Notes, an ideal combination for ... - sasCommunity

SAS and Lotus Notes, an ideal combination for ... - sasCommunity

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

filename odsout "d:\hugs\output";<br />

ods html body = "regio.html"<br />

path = odsout<br />

newfile = output;<br />

proc tabulate data=hugs.hugsd1_2;<br />

<strong>for</strong>mat ozc $ozc.;<br />

run;<br />

ods html close;<br />

In this example the $ozc-<strong>for</strong>mat contains links to other HTML-files. In the first proc tabulate<br />

a HTML-file is created <strong>for</strong> each ozc. These files are automatically numbered rg.html, rg1.html<br />

<strong><strong>an</strong>d</strong> so on. The second proc tabulate creates one HTML-file (regio.html) containing a table in<br />

which the ozc-variable is a row-variable which is <strong>for</strong>matted with the links to the other created<br />

HTML-files. Finally you add all files to your LN-database <strong><strong>an</strong>d</strong> you make sure that only<br />

regio.html c<strong>an</strong> be addressed directly.<br />

To give a user more possibilities to use the data represented by a HTML-table you c<strong>an</strong> store<br />

the data in <strong>an</strong> Excel-file <strong><strong>an</strong>d</strong> link the file to the HTML-document. This is shown below.<br />

Example: A static webpage with a link to Excel<br />

filename odsout "d:\hugs\output";<br />

ods html body = "polissenikazpexcel.html"<br />

path = odsout<br />

newfile = output;<br />

title "A<strong>an</strong>tal IKAZ-P polissen";<br />

title2 " %bquote() ";<br />

proc tabulate data=d1 out=d1_2 (drop=_page_ _type_ _table_);<br />

run;<br />

ods html close;<br />

Here a link to Excel is added in the title2-statement. The Href points to a pre-created Excelfile<br />

(which c<strong>an</strong> be located in the LN-database) <strong><strong>an</strong>d</strong> the Excel-logo is used as the link. Users<br />

who like to create their own graphs or tables using Excel c<strong>an</strong> now download the in<strong>for</strong>mation<br />

<strong><strong>an</strong>d</strong> c<strong>an</strong> do whatever they like with it.<br />

ODS gives you the possibility to control the look <strong><strong>an</strong>d</strong> feel of the HTML-files you create. One<br />

of the tools to do so is to create a style using the template-procedure. This paper doesn’t cover<br />

all the options, but a small example is shown below.<br />

Example: Creating a new style<br />

proc template;<br />

define style intra1;<br />

PARENT=styles.default;<br />

STYLE Body FROM Body/<br />

BACKGROUNDIMAGE='logo_zt.gif’; /* Background */<br />

STYLE SystemTitle FROM SystemTitle / /* Title above table */<br />

FONT_SIZE = 4<br />

FOREGROUND = or<strong>an</strong>ge<br />

BACKGROUND = purple;<br />

STYLE Header FROM Header / /* Column-head */<br />

FONT_SIZE = 2<br />

FOREGROUND = or<strong>an</strong>ge<br />

BACKGROUND = purple;<br />

STYLE Data FROM Data / /* Cells */<br />

FONT_SIZE = 2<br />

FOREGROUND = white<br />

BACKGROUND = purple;<br />

end;<br />

run;<br />

3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!