<?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 Inserting row of text above specific rows in PROC REPORT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Inserting-row-of-text-above-specific-rows-in-PROC-REPORT/m-p/747407#M234578</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using PROC REPORT and I'm wondering how I would go about inserting a row with text above specific rows in the table generated. The text row is used as a separator for constructs that the survey uses that the report the generated for. Below is my code for the report as of now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data = test_table headline COMPLETEROWS;
title 'Return of Results for SVA0901023';
columns NAME Rater_N Rater_Mean Rater_STD Rater_MIN Rater_MAX Rater_range Scholar_MEAN Difference;
define NAME / display 'Name' width = 10 format = $teamscience.;
define Rater_N / display 'Rater N' width = 2;
define Rater_Mean / analysis 'Rater Mean' format=8.1;
define Rater_STD / analysis 'Std Dev' format=8.1;
define Rater_MIN / analysis 'Rater Min' format = 8.1 noprint;
define Rater_MAX / analysis 'Rater Max' format = 8.1 noprint;
define Rater_range / computed 'Rater Range' format=8.1;
define Scholar_MEAN / analysis 'Scholar Rating' width = 10;
define Difference / computed 'Difference' format=8.1;
compute Rater_range;
	Rater_range = sum(Rater_MIN.sum,-1*Rater_MAX.sum);
endcomp;
compute Difference;
	Difference = sum(Rater_MEAN.sum,-1*Scholar_MEAN.sum);
	if Rater_MEAN.sum = . or Scholar_MEAN.sum = . then Difference = .;
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any help would be appreciated. I'm specifically looking to insert a text row above row 1, 10, 15, 27, and 33.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jun 2021 16:55:33 GMT</pubDate>
    <dc:creator>mitrakos</dc:creator>
    <dc:date>2021-06-11T16:55:33Z</dc:date>
    <item>
      <title>Inserting row of text above specific rows in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-row-of-text-above-specific-rows-in-PROC-REPORT/m-p/747407#M234578</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using PROC REPORT and I'm wondering how I would go about inserting a row with text above specific rows in the table generated. The text row is used as a separator for constructs that the survey uses that the report the generated for. Below is my code for the report as of now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data = test_table headline COMPLETEROWS;
title 'Return of Results for SVA0901023';
columns NAME Rater_N Rater_Mean Rater_STD Rater_MIN Rater_MAX Rater_range Scholar_MEAN Difference;
define NAME / display 'Name' width = 10 format = $teamscience.;
define Rater_N / display 'Rater N' width = 2;
define Rater_Mean / analysis 'Rater Mean' format=8.1;
define Rater_STD / analysis 'Std Dev' format=8.1;
define Rater_MIN / analysis 'Rater Min' format = 8.1 noprint;
define Rater_MAX / analysis 'Rater Max' format = 8.1 noprint;
define Rater_range / computed 'Rater Range' format=8.1;
define Scholar_MEAN / analysis 'Scholar Rating' width = 10;
define Difference / computed 'Difference' format=8.1;
compute Rater_range;
	Rater_range = sum(Rater_MIN.sum,-1*Rater_MAX.sum);
endcomp;
compute Difference;
	Difference = sum(Rater_MEAN.sum,-1*Scholar_MEAN.sum);
	if Rater_MEAN.sum = . or Scholar_MEAN.sum = . then Difference = .;
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any help would be appreciated. I'm specifically looking to insert a text row above row 1, 10, 15, 27, and 33.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 16:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-row-of-text-above-specific-rows-in-PROC-REPORT/m-p/747407#M234578</guid>
      <dc:creator>mitrakos</dc:creator>
      <dc:date>2021-06-11T16:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting row of text above specific rows in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-row-of-text-above-specific-rows-in-PROC-REPORT/m-p/747418#M234584</link>
      <description>&lt;P&gt;Example data in the form of a data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rules would have to be based on values in the data, not specific row numbers. That might mean adding a variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Report has allows things like "compute before" or "compute after" with a Group or Order variable to do something before the first group of values or after a group of values.&lt;/P&gt;
&lt;P&gt;If your variable Name was an ORDER variable instead of display you could use "compute before name;" to start a compute block that would execute before each group of values, or "compute after name;" to start a block that executes after the last data for each name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, just what text to intend to insert? The LINE statement in a compute block would be one typical tool to divide sections of a report.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 17:13:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-row-of-text-above-specific-rows-in-PROC-REPORT/m-p/747418#M234584</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-11T17:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting row of text above specific rows in PROC REPORT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-row-of-text-above-specific-rows-in-PROC-REPORT/m-p/747631#M234699</link>
      <description>Hi:&lt;BR /&gt;  You will need to designate a variable to "break" on in a COMPUTE block, as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; explained. Here's a user group paper &lt;A href="https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings17/SAS0431-2017.pdf&lt;/A&gt; that shows all the possible "breaking" methods where you can write text: In particular, the example on page 8-9 shows using the LINE statement in all the possible COMPUTE blocks.&lt;BR /&gt;Cynthia</description>
      <pubDate>Sun, 13 Jun 2021 17:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-row-of-text-above-specific-rows-in-PROC-REPORT/m-p/747631#M234699</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-06-13T17:45:20Z</dc:date>
    </item>
  </channel>
</rss>

