05-13-2013 10:50 AM
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.
Message was edited by: bonzy buddy
05-13-2013 01:06 PM
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 ;
page=int( (_n_-1) / 25) ;
set sashelp.cars (obs=50);
proc report data=cars nofs missing;
define page / noprint ;
define model / id ;
define mpg_city / page ;
ods listing ;
ods pdf close;