Problem having required pdf output.

Reply
Occasional Contributor
Posts: 18

Problem having required pdf output.

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

Super User
Posts: 10,548

Re: Problem having required pdf output.

How are you generating the ouput? Proc Print, Report, Tabulate or something else? Different methods have different options.

Occasional Contributor
Posts: 18

Re: Problem having required pdf output.

Proc report

Occasional Contributor
Posts: 18

Re: Problem having required pdf output.

NO one!!!!

Super User
Super User
Posts: 6,502

Re: Problem having required pdf output.

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;

Ask a Question
Discussion stats
  • 4 replies
  • 243 views
  • 3 likes
  • 3 in conversation