Hi there,
I am creating a pdf output file using PROC REPORT. in my code I am having two columns as ID which is going to be repeated on all the pages.
in my output, I am having 8 columns which can not fit into one horizontal page layout. So what I am doing is, I am keeping
4 columns on first page and rest 4 on second page using 'page' statement.
My problem is, I am having around 500 observations sometimes. So in PDF what happenes is, in first few pages all first 4 columns are
finished first and then pages for rest of the column starts.
For example, I have 500 obs and 8 columns. Then first 10 pages shows first 4 columns for all the obs and then rest 5-8 columns are printed
in next 10 pages. But my requirement is to print first page page with 1-4 columns followed by page showing 5-8 columns.
I hope I have simplified enough the problem to understand better. Quick help is appreciated.
Thanks.
Message was edited by: bonzy buddy
How are you generating the ouput? Proc Print, Report, Tabulate or something else? Different methods have different options.
Proc report
NO one!!!!
I do not know of a good way. You could try breaking the data into groups and using the group variable as a BY variable. But predicting where would be a good place to split that would yield nice looking tables could be hard. Here is an example using SASHELP.CARS.
ods pdf ;
ods listing close;
options nobyline ;
data cars;
page=int( (_n_-1) / 25) ;
set sashelp.cars (obs=50);
run;
proc report data=cars nofs missing;
by page;
define page / noprint ;
define model / id ;
define mpg_city / page ;
run;
options byline;
ods listing ;
ods pdf close;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.