BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cuevasj
Quartz | Level 8

I have a proc report that when it is too long, will not dispaly. Is there a functionality that will allow for an automatic page break? 

I can do two data steps with outobjs=40 on both and  grab the top 40 then the bottom 40 and put the bottom 40 and a second page, but if there is a more elegant solution, I would rather do that. Here is a sniplet of the code that I am using.

 

 

/*** Test History ~ EOCs ***/
ods region x=1.0cm y=2.40cm;
proc report data=work.test_history_EOC split='~' missing spanrows
style(header)={font_face="Helvetica" font_size=5pt height=5pt just=c vjust=m background=#D3D3D3 font_weight=bold };
column ((seqno)
('Grade' grade_level)
('Test' test_date test_code test_name)
('Subject' subject_code subject_desc)
('Test Score(s)' AL SS LX PA PF RS TS));
define seqno / group noprint;
define grade_level / group 'Level' style={cellspacing=0 cellheight=4pt cellwidth=0.80cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define test_date / group 'Date' style={cellspacing=0 cellheight=4pt cellwidth=1.00cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define test_code / group 'Code' style={cellspacing=0 cellheight=4pt cellwidth=0.80cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define test_name / group 'Name' style={cellspacing=0 cellheight=4pt cellwidth=3.50cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define subject_code / display 'Code' style={cellspacing=0 cellheight=4pt cellwidth=0.75cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define subject_desc / display 'Description' style={cellspacing=0 cellheight=4pt cellwidth=4.50cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define AL / display 'AL' style={cellspacing=0 cellheight=4pt cellwidth=0.65cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define SS / display 'SS' style={cellspacing=0 cellheight=4pt cellwidth=0.65cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define LX / display 'LX' style={cellspacing=0 cellheight=4pt cellwidth=0.65cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define PA / display 'PA' style={cellspacing=0 cellheight=4pt cellwidth=0.65cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define PF / display 'PF' style={cellspacing=0 cellheight=4pt cellwidth=0.65cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define RS / display 'RS' style={cellspacing=0 cellheight=4pt cellwidth=0.65cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
define TS / display 'TS' style={cellspacing=0 cellheight=4pt cellwidth=0.65cm just=c vjust=m font_face="Helvetica" fontsize=4pt};
compute grade_level;
if (mod(seqno,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute test_date;
if (mod(seqno,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute test_code;
if (mod(seqno,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute test_name;
if (mod(seqno,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute subject_code;
count+1;
if (mod(count,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute subject_desc;
if (mod(count,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute AL;
if (mod(count,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute SS;
if (mod(count,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute LX;
if (mod(count,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute PA;
if (mod(count,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute PF;
if (mod(count,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute RS;
if (mod(count,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
compute TS;
if (mod(count,2)) then do;
call define(_col_,'style','style={background=#F5F5F5}');
end;
endcomp;
title1 j=c height=6pt bold lspace=1pt '**State End of Course Exams**';
run;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Can you provide data in the form of a data step that duplicates that behavior?

Also which ODS destination and options are you using?

View solution in original post

4 REPLIES 4
ballardw
Super User

 

 

Do you get output that fill about a 2.4cm tall region and then stops displaying output?

cuevasj
Quartz | Level 8

No, I can display up to 40 rows, anything more than 40 rows and the report will not display.

 

ballardw
Super User

Can you provide data in the form of a data step that duplicates that behavior?

Also which ODS destination and options are you using?

Cynthia_sas
SAS Super FREQ

Hi:
You need to be very careful with ODS REGION and how it behaves/changes based on your ODS LAYOUT statements. Are you creating PDF output? Is your ODS LAYOUT gridded or absolute? Are you using a destination that supports ODS LAYOUT and ODS REGION, etc, etc. The rest of your code and your destination will help determine the issue. If you cannot share your data, then try to make some fake data or use one of the SASHELP datasets to try and replicate your problem.

cynthia

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1291 views
  • 0 likes
  • 3 in conversation