BookmarkSubscribeRSS Feed
sanjay1
Obsidian | Level 7

Hello SAS Experts,

 

Is ther is any way to add the cover page contents in the ods pdf.

The attached is the format how I wanted to get the contents in the cover page. Please help

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:
You can use contents=yes with ODS PDF to get a separate contents page, but the format of the contents page cannot be formatted as you show.

That would be the simplest way to get a Table of Contents. Otherwise, if you need a highly customized cover page, you would have to use techniques similar to those shown in the answer to your previous post:
https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/How-to-list-and-use-all-the-colors-in-sas-... which shows a PROC REPORT solution.

Also, this is probably not the correct forum in which to post your question. I don't see any graph code in your previous examples, so this might be better posted in the ODS and Reporting Forum.

Please try this code to see how contents=yes works with ODS PDF.

 


cynthia.

 

options pageno=1 nodate number;
   
ods pdf file='c:\temp\withcontents.pdf' contents=yes;
 
ods proclabel 'Show Students';
proc print data=sashelp.class contents='Print Names';
run;

ods proclabel 'Descriptive Statistics';
proc means data=sashelp.class;
class age;
var height;
run;

ods proclabel 'Counts for AGE and SEX';
proc freq data=sashelp.class;
  tables age sex;
run;

ods proclabel 'Percentiles';
ods select percentiles;
proc univariate data=sashelp.class;
var height;
run;

ods proclabel 'CrossTab Report';
proc tabulate data=sashelp.class contents='SASHELP.CLASS';
  class age sex;
  var height;
  table sex*age all,
        height*(min mean median max)/ contents='Sex and Age Table';
run;
ods pdf close;

Note how ODS PROCLABEL and the procedure level CONTENTS= option alters the text that is shown in the Contents page:

show_contents.png

sanjay1
Obsidian | Level 7

Thank you cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1049 views
  • 0 likes
  • 2 in conversation