How to Create a Custom Style Sonia Extremera / Antonio Nieto / Javier Gómez PhUSE Annual Conference, 9th-12th Oct 2011, Brighton UK.

Slides:



Advertisements
Similar presentations
Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Advertisements

Cascading Style Sheets
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Week 9 Using the Box Properties. 9-2 The CSS Visual Formatting Model Describes how the element content boxes should be displayed by the browser –Based.
CSS: Class 1 Background Images, Controlling Position of Background Images, Add Padding to Page Elements, Add Borders to Elements on a Page.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 6 - Cascading Style Sheets™ (CSS) Outline 6.1 Introduction 6.2 Inline Styles 6.3 Embedded Style.
1 Lesson Style Sheets Box Model Content (text,image,table) Margin Padding Border Box.
Web Design HTML Basic Robertus Setiawan Aji Nugroho References: w3schools.com.
Creating Tables Text Tables -created by using preformatted tags. Graphical Tables - created using Table Structure with HTML.
Tutorial 4: Designing a Web Page with Tables
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
Using HTML Tables.
Style sheets can also affect the BODY. style4.css BODY {BACKGROUND-COLOR : white} H1 {COLOR : red; FONT-SIZE : 50; FONT-FAMILY : arial} H2 {COLOR : green}
Style sheets can also affect the body. style4.css body {background-color : white} h1 {color : red; font-size : 50; font-family : arial} h2 {color : green}
1 Tables: Data in Rows and Columns – What is Table? – How Tables are Used? – Designing Tables – Table, Cell, Row Attributes – Using Tables for Alignment.
Customize your SAS® Output with the Template Procedure: A Beginning Tutorial Carol Gosselin North Carolina State University, Raleigh, NC Joy Munk Smith.
HTML Essentials Tables and Table Tags. Overview Use of Tables goes beyond tabulating data Frequently used to format Web pages / control layout Especially.
Chapter 5 Working with Tables. Agenda Add a Table Assign a Table Border Adjust Cell Padding and Spacing Adjust Cell Width and Height Add Column Labels.
XP 1 Tutorial 4 Designing a Web Page with Tables.
Updated on: September 4, 2010 CIS67 Foundations for Creating Web Pages Professor Al Fichera.
CSS Dvijesh Bhatt.
Cascading style sheets (CSS)
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
HTML, Third Edition--Illustrated Introductory 1 HTML, Third Edition Illustrated Introductory Unit F Working with Tables.
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
HTML. Basic HTML HTML document – HTML headings – to HTML paragraphs – HTML links – HTML images –
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorials 3 & 4: Working With CSS.
CSS Border.
My ODS: Real-World Uses of Modifying Table Templates Steve James Centers for Disease Control and Prevention Atlanta, Ga.
PROC TEMPLATE: The Basics Lauren Haworth Genentech, Inc. South San Francisco, CA.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
SAS Software Version 8 The Output Delivery System.
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 19 Organizing and Enhancing Worksheets 1 Morrison / Wells / Ruffolo.
Copyright 2006 South-Western/Thomson Learning Chapter 12 Tables.
Using the new Version 8 Template Procedure for Complete Control of SAS Output Style and Format David Ghan Technical Training Specialist SAS, Canada.
ECA 228 Internet/Intranet Design I Tables. ECA 228 Internet/Intranet Design I Basic HTML Tables Created as a way to present rows and clumns of data.
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 6 - Cascading Style Sheets™ (CSS) Outline 6.1 Introduction 6.2 Inline Styles 6.3 Embedded Style.
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
Advanced Web Development Instructor: Thomas Bombach.
Working with Themes, Quick Parts, Page Backgrounds, and Headers and Footers Lesson 7.
CSE 409 – Advanced Internet Technology 1 DISCUSSION OF BASIC HTML TAGS.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  CSS Box Model  CSS properties for border  CSS properties for.
Microsoft Expression Web-Illustrated Unit F: Enhancing a Design with CSS.
Copyright © Osmosys O S M O S Y SO S M O S Y S D e p l o y i n g E x p e r i e n c e & E x p e r t i s e™ CSS Training.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Bookstore Web Application: Client Tier Introducing Web Controls.
Customize SAS Output Using ODS Joan Dong. The Output Delivery System (ODS) gives you greater flexibility in generating, storing, and reproducing SAS procedure.
What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup.
COS 125 DAY 14. Agenda  Assignment 6 DUE  Assignment 7 Posted Due March 9:35 AM  Quiz 2 will be on March 30 Chapters M/C and 4 Short.
LINKING WEBPAGES USING HTML HYPERLINKS. Hyperlinks are text strings or images on a webpage which when clicked on, links to another section in the same.
CSS Table Styling. Up to this point, as we haven't applied any CSS styling to our tables, our example tables have not been too pleasing to the eye. CSS.
Web and Multimedia Development Copyright © Genetic Computer School 2007WM LESSON OVERVIEW  Use of Tables  Creating Tables  Try It – 1  Creating.
Tutorial #5 Working with the Box Model. Tutorial #4 Review - CSS Create a homework page Final Project Discussion Exam on Blackboard Styling Lists (List-style-type,
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
Unit 3 - Review. Topics 1. Tag, Attribute, Value 2. CSS Rule Syntax + link 3. Categories of Selectors 4. Inline vs Block Tags 5. CSS Layout 6. CSS Box.
SAS ® 101 Based on Learning SAS by Example: A Programmer’s Guide Chapters 14 & 19 By Tasha Chapman, Oregon Health Authority.
CSS. What does it stand for? ___________________.
CSS. What does it stand for? Cascading Style Sheet.
Yourfriendmanoj.wordpress.com Fb/yourfriendmanoj
The Internet 10/13/11 The Box Model
For the World Wide Web Styling Tables with CSS
Lesson 19 Organizing and Enhancing Worksheets
Presentation transcript:

How to Create a Custom Style Sonia Extremera / Antonio Nieto / Javier Gómez PhUSE Annual Conference, 9th-12th Oct 2011, Brighton UK

Introduction SAS® provides a wide range of default styles Proc Template styles give you the power to customize the look of your reports Redefining the style elements and attributes to customize, for example: –Fonts –Margins –Sizes –Data justification or –Colors

Steps to create a custom style Browse all available SAS templates Choose the template that matches better with your company requirements Get the template script Redefine the style elements and attributes according to your company’s standards Save it in a template library Share it with your colleagues

Browse all available SAS templates: List of styles Two ways to get a list with the name of all templates in styles directory: –ODSTEMPLATES into the command bar –Proc Template using List statement: Proc template; list styles; run;

Browse all available SAS templates: ODSTEMPLATES

Browse all available SAS templates: List statement By using Proc Template programming, all templates in styles directory will be listed

Browse all available SAS templates: Style output To see an example of the result of every style: ODS html file = ‘file_name’ style=“style_name”; Proc contents data=data_name short; run; ODS close; Use the SAS macro shown in the paper IS04, PhUSE 2011, and an example of every style will be stored for the ODS destination used

Browse all available SAS templates: Style output Each SAS procedure has a default template for each ODS destination PDF HTML RTF

Choose a template to be modified Choose the template that fits better with your necessities to minimize the changes needed to get your own style

Get the template script Two ways to get the source code: –ODSTEMPLATES into the command bar and double- clicking a template style to display its source code –Proc Template using Source statement Proc template; source styles.style_name / file = 'file_name.sas'; run; “Proc Template;” and “Run;” have to be added at the beginning and the end of the program, respectively

Get the template script: ODSTEMPLATES

Get the template script Source code of sasdocPrinter style: Name of the style: If a new style is to be created by modifying the existing style, the resulting style can be renamed here

Get the template script Source code of sasdocPrinter style: Parent: It specifies a style definition from which style elements are inherited

Get the template script Source code of sasdocPrinter style: Statements: They show the statements where the style element fonts, GraphFonts, Table and HeadersAndFooters are defined

Get the template script Source code of sasdocPrinter style: Attributes for the style element Fonts

Get the template script Source code of sasdocPrinter style: Parent style element: The style element Table inherits its properties from another style element, Output

Redefine the style elements and attributes: Statements Commonly used statements are: –STYLE Statement: Creates or modifies one or more style elements style style-element / style-attributes; –CLASS Statement: Creates a style element from a like-named style element class style-element / style-attributes;

Elements Style element: a collection of style attributes that applies to a particular part of the output

The main style elements used: –TitlesandFooters: Controls system page title and footer text –Body: Controls the body of the output –Font: Controls the fonts –Colors: Controls the colors –Table: Controls overall table style –Cell: Controls data, header and footer cells –HeadersAndFooters: Controls table headers and footers Elements

Attributes Style attribute: a name-value pair that describes a single behavioral or visual aspect of a piece of output

Attributes General style attributes –Backgroundcolor = color-name | hex-color –Backgroundimage = ”path-to-file” –Color = color-name | hex-color –Height = dimension / Width = dimension –Preimage = ”path-to-file” / Postimage = ”path-to-file” –Pretext = “text” / Posttext = “text”

Attributes Font and text style attributes –Fontfamily = “fontfamily-1, fontfamily-2, …” –Fontsize = dimension –Fontstyle = italic | roman | slant –Fontweight = bold | medium | light

Attributes General style attributes –Borderspacing = dimension / Cellspacing = dimension –Frame = box | above | below | hsides | vsides | lhs | rhs | void –Padding = dimension / Cellpadding = dimension –Rules = all | cols | rows | groups | none

Attributes Border style attributes –Bordercolor = color-name | hex-color –Borderstyle = dashed | dotted | double | groove | hidden | inset | outset | ridge | solid | none –Borderwidth = dimension

Example Styles.sasdocPrinterMyStyle

ODS MARKUP ODS MARKUP: An easy way to see which bits of code control which parts of your output

ODS MARKUP Hover over part of the output: –Its background changes to red color –A label shows the name of the style element

ODS MARKUP Click on a part of the output: –Source code for that style element pops up

Save it in a template library Submit your PROC TEMPLATE statements as you would do with any other SAS program ODS saves the template in the first template library that it can update; by default, SASUSER.Templat The style templates provided by SAS are stored in the library SASHELP.Tmplmst

Save it in a template library: ODS PATH To see the list of template libraries: ods path show; The results are shown in Log screen: Current ODS PATH list is: 1. SASUSER.TEMPLAT(UPDATE) 2. SASHELP.TMPLMST(READ) New template libraries can be added The order can be changed

Save it in a template library: ODS PATH ODS PATH redefine the libraries and order libname template 'C:\Phuse\SAS templates'; ods path template.MyStyle(update) sashelp.tmplmst(read); –UPDATE: It provides update and read access to TEMPLATE.MyStyle –READ: it provides read-only access to SASHELP.Tmplmst ODS uses the first template it finds with the requested name Templates with the same name can exist in different template libraries

Share it with your colleagues The new template must be stored in a shared location All users must define the SAS library Template in the shared location, with the libname statement The shared library must be set in the first place for all users

Share it with your colleagues: Useful tip Use an existing name for your new style template to avoid detailing the style in every ODS destination –Tools > Options > Preferences to modify the SAS style by default

Conclusion Proc Template is a powerful tool to customize the look of your reports First of all, browse the SAS supplied templates to find the style that matches better with your necessities Then, modify the attributes of the template elements. You can be helped by ODS markup destination Finally, save and share it with your colleagues in order to produce the same reports

Questions