BookmarkSubscribeRSS Feed
sasiscool
Obsidian | Level 7

Is there any way with a compute statement or using the _RBREAK_ column to add a break line in a proc report anywhere i would like.

 

for instance, breaks are linked to the grouping variable, and one could place one after or before the defined grouping variable in a report.

 

e.g.


proc report data=work.final
column question online_type_desc, (n response1);
define question/group f=$question. 'Question';
define online_type_desc/across f=$online.;
define n/ f=comma8.;

define response1/analysis mean f=8.2 'Average' ;

 

break after question/summarize.....

 

However, lets say I don't want to break after the natural breaks in question. I want to break every 3rd line? I assume i could make a dummy grouping variable and hide it, but this might change too.  In this report, every 3 lines, but in the next, I want to break it every 5th line. Is there anyway to do this within the proc report code itself?

2 REPLIES 2
arodriguez
Lapis Lazuli | Level 10

Hello,

 

If in your reports you want to break every 3 lines or X lines, you could edit the page size with 

 

options ps=3;

This will make that the natural break page change to the 3th line.

 

Also you could create a group variable as you have said and create a compute after like this

 break after GROUPING_VAR  / page;

This will create the break "_PAGE_" character at the end of each group.

 

I hope that this help you

 

 

 

sasiscool
Obsidian | Level 7

hey thanks man for the the tips. I wasn't aware of the page function.

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!

Discussion stats
  • 2 replies
  • 1317 views
  • 0 likes
  • 2 in conversation