Presentation is loading. Please wait.

Presentation is loading. Please wait.

A MORE COMPLETE ODS REPORT. What we’re going to talk about…  Creating a title page  Creating an introduction page  Creating long-form text descriptions.

Similar presentations


Presentation on theme: "A MORE COMPLETE ODS REPORT. What we’re going to talk about…  Creating a title page  Creating an introduction page  Creating long-form text descriptions."— Presentation transcript:

1 A MORE COMPLETE ODS REPORT

2 What we’re going to talk about…  Creating a title page  Creating an introduction page  Creating long-form text descriptions  Creating a table of contents  Structuring the graph pages  Some other ODS and style template things that are required to pull everything together

3 How we’re going to do it…  ODS inline formatting  Used for displaying the header, creating links, and formatting text  Graph template language  Used for creating the graphs and structuring the pages  Style templates  Used for certain graph attributes and general formatting  Macro variables  Used for containing graph text descriptions

4 The ODS preamble  Line 914 – style=mycolors is a user-defined style template needed for changing some graph colors  Line 916 – ods trace on is an option that returns information about style templates in the log  Line 917 – Defines the character that allows inline formatting. In the case it is a tilde

5 Title page

6 Making the title page…  Use ODS inline formatting to pull in the DCBS header  Use a proc to provide the title  Creating a page for text in ODS requires a proc statement of some kind  I couldn’t find a way to insert a blank page without one

7 The DCBS logo header  Line 919 and 923 – define the size of the page and where the logo picture will go  Line 921 – uses the ODS escape character to use the preimage statement to pull in the picture at the specified location  Wasn’t able to find a lot of online documentation on the preimage statement

8 The title text  Line 892 through 895 – creates the text string that forms the title and put it into a dataset  Line 894 – the ~n is the inline formatting character for a new line of text  Line 926 through 928 – creates the centered text on the title page

9 Introduction page

10 Making the introduction page  Read in the introductory text from a.txt file  This.txt file can have inline formatting delineated by the ods escape character  Print it

11 What the introductory text looks like  You can see there are unneeded quotes around the text string  I should get rid of the quotes and see if there is an inline formatting character for a tab (&nbsp perhaps)  Regular spaces won’t work because of the strip() function  About half-way through you can see two newline characters (~n~n)

12 Reading in the introductory text  Line 30 through 33 – read in the text from chartbookintro.txt into the 5,000 character long variable called intro  We don’t know how long the text string is so we make sure the variable is overlong  Line 37 – use the strip() function to get rid of the excess spaces

13 Outputting the introductory text  Line 933 – print the output  Uses the noobs statement to suppress the observation number

14 Table of contents

15 Making the table of contents  Use proc report to produce the table of contents header  Use inline formatting to produce links

16 Making the table of contents text  Line 936 through 938 – the title is done the same way we did the title for the title pagetitle page  Line 935 – this is how the location is defined for linking  At the bottom of each chart page is a link to this anchored location so you can get back to the contents page easily

17 Making the chart links  Line 940 through 945 – ods pdf text inserts a text string on a page  ~S is used to denote a series of formatting statements  url=‘#chart1’ is the link that is underneath the text string ‘Chart 1 – WCTax enterers and exiters’ ‘#chart1’ is defined in an ods pdf anchor statement  The first occurrence is for spacing purposes

18 The chart

19 Making the chart pages  The chart template  The text in the sidebar  ODS output, link back to the table of contents, and the pdf anchor destination

20 Creating the chart template  Line 614 – define one row with two columns. 1 st column contains graphs and 2 nd column contains the text  Line 619 – defines three rows in first column for three graphs

21 Creating the chart template  This defines the top barchart on page 8  Line 631 – group=organization has an impact on how to format the bars. The bar colors can’t be changed from inside the graph template; they have to be changed in the ODS style template

22 Style template interactions

23 Changing the color of grouped series  Line 906 and 907 – define the color of grouped data  Line 908 – sets the light-grey background color  Line 909 – linkcolor=_undef_ gets rid of an ugly box around hyperlinks

24 Adding the text sidebar  Line 40 through 48 – reading in the text and putting it into a macro variable  Line 663 – drawtext is put in the graph template the same place a chart type would be entered. In our case it is the sole occupant of the right side of the graph page  Line 664 – anchor=topleft tells the template where the text is to start and width=100 tells the template how far across the text extends. The remainder defines how the text is justified

25 Making the charts and their links  Line 947, 951, and 955 – the ods pdf anchor for each page is defined on these lines. These are the locations in the pdf that the links on the table of contents page point to  Line 948, 952, and 956 – these lines produce the charts from the different datasets and through the graph templates  Line 949, 953, and 957 – the ods pdf text statement produces a link back to the table of contents

26 Bibliography  Bessler, L. (n.d.). Getting Started with, and Getting the Most out of, SAS ODS PDF:. Retrieved May 8, 2013, from PhUSE Wiki: http://www.phusewiki.org/docs/2005/PAPERS/TS05.pdfhttp://www.phusewiki.org/docs/2005/PAPERS/TS05.pdf  SAS. (n.d.). SAS(R) 9.3 Graph Template Language: Reference, Third Edition. Retrieved May 8, 2013, from SAS Documentation: http://support.sas.com/documentation/cdl/en/grstatgraph/65377/HTML/default /viewer.htm#titlepage.htmhttp://support.sas.com/documentation/cdl/en/grstatgraph/65377/HTML/default /viewer.htm#titlepage.htm  SAS. (n.d.). SAS(R) 9.3 Graph Template Language: User's Guide. Retrieved May 8, 2013, from SAS Documentation: http://support.sas.com/documentation/cdl/en/grstatug/63302/HTML/default/ viewer.htm#titlepage.htmhttp://support.sas.com/documentation/cdl/en/grstatug/63302/HTML/default/ viewer.htm#titlepage.htm  SAS. (n.d.). TS-688: Defining Colors using Hex Values. Retrieved May 8, 2013, from SAS Knowledgebase: http://support.sas.com/techsup/technote/ts688/ts688.html http://support.sas.com/techsup/technote/ts688/ts688.html  Zender, C. L. (2007). Funny ^Stuff~ in My Code: Using ODS ESCAPECHAR. Retrieved May 8, 2013, from Proceedings of SAS Global Forum: http://www2.sas.com/proceedings/forum2007/099-2007.pdfhttp://www2.sas.com/proceedings/forum2007/099-2007.pdf


Download ppt "A MORE COMPLETE ODS REPORT. What we’re going to talk about…  Creating a title page  Creating an introduction page  Creating long-form text descriptions."

Similar presentations


Ads by Google