Data visualization with SAS programming

proc report and titles

Reply
Frequent Contributor
Posts: 142

proc report and titles

Hi all--

I'm having some trouble writing titles into 3 proc report statements which all appear on one page. Any advice on to add the titles in would be greatly appreciated. Thanks!

title1 'Special Medical Review Total Score';


proc report

data=All_Spec_Med_Qs_TotalScore nowd headline headskip

style(column)={just=c font_size=11pt font_face= 'Arial Narrow'cellwidth=2in}

style(header)={font_size=11 pt font_face= 'Arial Narrow' FONT_WEIGHT =BOLD background=cxcccccc};

column    totalAwarded Total_Possible  Final_score ;

define Final_score / display

style(column)={ cellwidth=1.8in};

run;

title2  Special Medical Review Quality Score;

proc report

data=Spec_Med_Quality_Qs_TotalScore nowd headline headskip

style(column)={just=c font_size=11pt font_face= 'Arial Narrow'cellwidth=2in}

style(header)={font_size=11 pt font_face= 'Arial Narrow' FONT_WEIGHT =BOLD background=cxcccccc};

column totalAwarded Total_Possible  Final_score;

define Final_score / display

style(column)={ cellwidth=1.8in};

run;

title3 Special Medical Review Compliance Score ;

proc report

data=Spec_Med_Comp_Qs_TotalScore  nowd headline headskip

style(column)={just=c font_size=11pt font_face= 'Arial Narrow'cellwidth=2in}

style(header)={font_size=11 pt font_face= 'Arial Narrow' FONT_WEIGHT =BOLD background=cxcccccc};

column totalAwarded Total_Possible  Final_score;

define Final_score / display

style(column)={ cellwidth=1.8in};

run

Grand Advisor
Posts: 10,211

Re: proc report and titles

You don't say what your problem actually is but I'm going to guess that you get two lines of title for the second report and only want one and are getting three lines for tha last one.

Title is sort of a space holder with up to 9 lines. And all currently defined lines will show. I suspect that you want to use TITLE1 for each of your PROC REPORT calls to show one main line of title.

For an alternative appearance try this:

Title1 "Special Medical Review";

Title2 "Total Score";

before the second proc report

Title2 "Quality Score";

and before the third

Title2 "Compliance Score";

Contributor
Posts: 46

Re: proc report and titles

Hi,

If you are using ODS PDF, you can do something like this:

ods pdf text= "Special Medical Review Total Score"; (for each one);

SAS Super FREQ
Posts: 8,720

Re: proc report and titles

Hi:

  I believe this question probably should have been posted in the ODS and Reporting forum, not the ODS and Graphics forum. Unless your code has some SAS/GRAPH or ODS GRAPHICS.

  You did not say what your destination of interest was -- RTF, PDF or HTML. Titles are GLOBAL in nature. You can have up to 10 titles.. What ODS statements are you using for your report? In the LISTING destination, these 3 reports would not print on 1 page. So I figure you are using either PDF, RTF or HTML.

  You have received some good information about SAS title statements in general and for dealing with ODS PDF in particular. I'd suggest you investigate TITLE statements in a bit more depth and possibly post ALL of your code, including ODS statements, so we can understand the whole picture. TITLE statements can behave differently in different destinations and their behavior is also dependent on the other options you are using (such as BODYTITLE or STARTPAGE or ...)

cynthia

Super Contributor
Posts: 349

Re: proc report and titles

Hi,

If I guess correctly,you are getting the all three titles in all the reports which you want to restrict.Try this..

title 'test1';

proc print data=sashelp.class;run;

title '';

title 'test2';

proc print data=sashelp.class;run;

title '';

title 'test3';

proc print data=sashelp.class;run;

title '';

Thanks,

Shiva

Regular Contributor
Regular Contributor
Posts: 156

Re: proc report and titles

Hi Mgarret,

if you want to put all report tables on one page then don't use title. Use ods pdf text=""; instead.

ods pdf text="your first title";

proc report....;

run;

ods pdf text="your second title";

proc report...;

run;

etc.

Best wishes

Eva

Ask a Question
Discussion stats
  • 5 replies
  • 390 views
  • 0 likes
  • 6 in conversation