Is it possible to have two different titles while splitting the data into two pages in proc report? For example, I have a data of 10 variables to present and I am splitting the data into 2 pages using ID variable. I want the title of 1st page as 'ABCD' and the 2nd pages as 'ABCD- Continued'.
If you are using a BY statement then you can provide options with the by variables. If your ID variable contains the text you want to use you could use the title option "#byval", if not create a format to map the actual value to the desired text.
proc sort data=sashelp.class out=work.class;
'F' = 'First Title'
'M' = '(cont) First Title'
/* supress default BY line appearance*/
proc report data=work.class;
format sex $sexval.;
columns name age;
/* reset byline*/
The Sort is create a data set that can be displayed with BY group in Proc print. The Format will display text different than that of the variable. The Options nobyline means that the default "Sex=value" will not display. The title statement with #Byval means only the value of the by variable appears in that title line. The Format statement in the body of Proc report associates the format with the variable for just that proc report. Then reset the Byline option back to the default.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.