<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: re: Proc Report Break After in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/re-Proc-Report-Break-After/m-p/444992#M20613</link>
    <description>&lt;P&gt;Hi:&lt;BR /&gt;&amp;nbsp; You didn't post any data, so any comments that people will make on your posted code will mean that they are only guessing.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; Order1 is an ORDER variable. You said that Order1 has possible values of 1 and 2. and you only want summation to happen after the values for 1 and not for the values of 2. This is not how PROC REPORT performs break processing.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; I do have some comments on your code, however. LS and PS are ignored for ODS destinations, like ODS PDF.&amp;nbsp; SKIP will also be ignored by ODS PDF. What are you doing with the Module item? Is it a temporary variable? I do not see it in your COLUMN statement.&lt;BR /&gt;&lt;BR /&gt;Also, you have a DEFINE Statement for Academic Year, but I don't see it in a COLUMN statement, so I would expect you to get an error like this:&lt;BR /&gt;WARNING: 'Academic Year'n is not in the report definition.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; However, making some fake data, that may or may not be in the structure that your data are in, I produced this code. Note that my data has slightly different variable names and colors from your code because it was my data and so I used simpler names and the fluorescent green made my eyes hurt. I took NOPRINT off ORDER1, so it was clear where the BREAK line was occuring and I added the LINE statement to mimic the SKIP option.&lt;BR /&gt;&lt;BR /&gt;Here's the output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="academic_year.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19161i9CA191FF369D8E77/image-size/large?v=v2&amp;amp;px=999" role="button" title="academic_year.png" alt="academic_year.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;And here's my code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fakedata;
  infile datalines;
  input Order1 uniq_enrl1 uniq_enrol uniq_admit acad_year;
return;
datalines; 
1 777 1436 1179 2016 
1 922 1124 1261 2016 
2 767 1691 1259 2016 
2 842 2176 1264 2016 
1 734 1428 1356 2017 
1 848 1666 1275 2017 
1 816 1322 1162 2017 
2 897 1912 1469 2017 
2 811 1742 1442 2017
2 825 1531 1343 2017 
run;
 
ODS PDF FILE="c:\temp\fakedata.PDF" STYLE=MINIMAL 
    NOTOC BOOKMARKGEN=NO BOOKMARKLIST=NONE;
PROC REPORT DATA=fakedata MISSING NOWD spanrows
		style(report)={frame=box just=CENTER WIDTH=60%};
column acad_year uniq_enrl1 uniq_enrol uniq_admit   Order1;
DEFINE acad_year / GROUP 'Academic Year *' ;
DEFINE uniq_enrl1 / ANALYSIS 'Enrolled (Final)**' ;
DEFINE uniq_enrol / ANALYSIS 'Enrolled (Initial)***' ;
DEFINE uniq_admit / ANALYSIS 'Admitted****' ;  
DEFINE Order1 / ORDER ; 

break after Order1 /  summarize;
compute after Order1;
  line ' ';
  call define (_row_, "style", "style={background=lightgreen}");
endcomp;
run;
 
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;As you can see, by default, PROC REPORT wants to produce a break line for every unique value of ORDER 1.&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;/P&gt;</description>
    <pubDate>Tue, 13 Mar 2018 01:56:57 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2018-03-13T01:56:57Z</dc:date>
    <item>
      <title>re: Proc Report Break After</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/re-Proc-Report-Break-After/m-p/444804#M20611</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi....I am trying to break and summarize only when Order1 =1. Order1 has the numeric values of 1 and 2. Is it possible to specify or select specific values where the breaks and summarization will occur. Right now it is breaking after Order1 = 1 and Order1 = 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ODS PDF FILE="%sysfunc(pathname(project))\Enrollment and Graduate Report (&amp;amp;rundate).PDF" STYLE=MINIMAL NOTOC BOOKMARKGEN=NO BOOKMARKLIST=NONE STARTPAGE=NOW;
PROC REPORT DATA=AcadYearUniqStudentFinal MISSING ps=43 ls=108 NOWD spanrows
		style(report)={frame=box just=CENTER WIDTH=60%};

COLUMN ('Unique Number Students Enrolled1'n 'Unique Number Students Enrolled'n 'Unique Number Students Admitted'n Order1);
DEFINE 'Academic Year'n / GROUP 'Academic Year *' ;
DEFINE 'Unique Number Students Enrolled1'n / ANALYSIS 'Enrolled (Final)**' ;
DEFINE 'Unique Number Students Enrolled'n / ANALYSIS 'Enrolled (Initial)***' ;
DEFINE 'Unique Number Students Admitted'n / ANALYSIS 'Admitted****' ;  
DEFINE Order1 / ORDER NOPRINT; 

break after Order1 / skip summarize;
	compute after Order1;
			Module = 'Total **';
	if Module  ^= ' '
		then call define (_row_, "style", "style={background=lawngreen}");
	 endcomp;

run;
quit;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Mar 2018 15:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/re-Proc-Report-Break-After/m-p/444804#M20611</guid>
      <dc:creator>twildone</dc:creator>
      <dc:date>2018-03-12T15:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: re: Proc Report Break After</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/re-Proc-Report-Break-After/m-p/444992#M20613</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;&amp;nbsp; You didn't post any data, so any comments that people will make on your posted code will mean that they are only guessing.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; Order1 is an ORDER variable. You said that Order1 has possible values of 1 and 2. and you only want summation to happen after the values for 1 and not for the values of 2. This is not how PROC REPORT performs break processing.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; I do have some comments on your code, however. LS and PS are ignored for ODS destinations, like ODS PDF.&amp;nbsp; SKIP will also be ignored by ODS PDF. What are you doing with the Module item? Is it a temporary variable? I do not see it in your COLUMN statement.&lt;BR /&gt;&lt;BR /&gt;Also, you have a DEFINE Statement for Academic Year, but I don't see it in a COLUMN statement, so I would expect you to get an error like this:&lt;BR /&gt;WARNING: 'Academic Year'n is not in the report definition.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; However, making some fake data, that may or may not be in the structure that your data are in, I produced this code. Note that my data has slightly different variable names and colors from your code because it was my data and so I used simpler names and the fluorescent green made my eyes hurt. I took NOPRINT off ORDER1, so it was clear where the BREAK line was occuring and I added the LINE statement to mimic the SKIP option.&lt;BR /&gt;&lt;BR /&gt;Here's the output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="academic_year.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19161i9CA191FF369D8E77/image-size/large?v=v2&amp;amp;px=999" role="button" title="academic_year.png" alt="academic_year.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;And here's my code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fakedata;
  infile datalines;
  input Order1 uniq_enrl1 uniq_enrol uniq_admit acad_year;
return;
datalines; 
1 777 1436 1179 2016 
1 922 1124 1261 2016 
2 767 1691 1259 2016 
2 842 2176 1264 2016 
1 734 1428 1356 2017 
1 848 1666 1275 2017 
1 816 1322 1162 2017 
2 897 1912 1469 2017 
2 811 1742 1442 2017
2 825 1531 1343 2017 
run;
 
ODS PDF FILE="c:\temp\fakedata.PDF" STYLE=MINIMAL 
    NOTOC BOOKMARKGEN=NO BOOKMARKLIST=NONE;
PROC REPORT DATA=fakedata MISSING NOWD spanrows
		style(report)={frame=box just=CENTER WIDTH=60%};
column acad_year uniq_enrl1 uniq_enrol uniq_admit   Order1;
DEFINE acad_year / GROUP 'Academic Year *' ;
DEFINE uniq_enrl1 / ANALYSIS 'Enrolled (Final)**' ;
DEFINE uniq_enrol / ANALYSIS 'Enrolled (Initial)***' ;
DEFINE uniq_admit / ANALYSIS 'Admitted****' ;  
DEFINE Order1 / ORDER ; 

break after Order1 /  summarize;
compute after Order1;
  line ' ';
  call define (_row_, "style", "style={background=lightgreen}");
endcomp;
run;
 
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;As you can see, by default, PROC REPORT wants to produce a break line for every unique value of ORDER 1.&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 01:56:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/re-Proc-Report-Break-After/m-p/444992#M20613</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-03-13T01:56:57Z</dc:date>
    </item>
  </channel>
</rss>

