<?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: Proc Report : How to display the ID info after the Page Break when same ID info goes to next pag in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/957867#M373884</link>
    <description>&lt;P&gt;Have you seen this page?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Get-SUBJECT-id-to-show-on-each-page-of-a-listing-when-a-subjects/td-p/921637" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Get-SUBJECT-id-to-show-on-each-page-of-a-listing-when-a-subjects/td-p/921637&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You need to use the TAGSETS.RTF destination rather than RTF, and the SPANROWS option in PROC REPORT.&lt;/P&gt;
&lt;P&gt;These almost-but-not-quite-redundant ODS destinations are anything but clear tbh.&lt;/P&gt;</description>
    <pubDate>Sun, 16 Feb 2025 02:19:46 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2025-02-16T02:19:46Z</dc:date>
    <item>
      <title>Proc Report : How to display the ID info after the Page Break when same ID info goes to next page</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/957827#M373875</link>
      <description>&lt;P&gt;I am creating a list for the Traveling; however, when using the proc report to RTf destination, My one customer ID info goes across the multiple pages. Therefore, we want to display Customer ID information across the pages. I tried 'GROUP' , 'ID' or SPANROWS options but no luck.&amp;nbsp; Any inputs greatly appreciated.&lt;/P&gt;
&lt;P&gt;here is the data:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    length CustomerID $10 Visit $10 TicketNumber $300 Destination $20;
    CustomerID = "CUST000001";
	pageno =1;

    /* Array of U.S. state names */
    array states[50] $20 _temporary_ (
        'Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia',
        'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland',
        'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey',
        'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina',
        'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'
    );

    call streaminit(123); /* Initialize random number generator for reproducibility */

    do i = 1 to 50;
        Visit = catt("Month", i);
        TicketNumber = "";

        /* Assign a random state as the destination */
        Destination = states[ceil(rand("Uniform") * dim(states))];

        do j = 1 to 15;
            /* Generate a 10-digit numeric part */
            NumPart = put(ceil(rand("Uniform") * 8999999999 + 1000000000), z10.);

            /* Generate two random letters (one uppercase, one lowercase) */
            CharPart = cats(byte(65 + floor(rand("Uniform") * 26)), byte(97 + floor(rand("Uniform") * 26)));

            /* Combine them to form a 12-character ticket number */
            Ticket = cats(NumPart, CharPart);

            if j = 1 then 
                TicketNumber = Ticket;
            else 
                TicketNumber = catx(", ", TicketNumber, Ticket);
        end;

        output;
    end;
    drop i j NumPart CharPart Ticket;
run;
title '';
footnote '';
ods results on;
ods rtf file="C:\Users\want.rtf" style = rtf;

proc report data=have headline headskip missing split="*" style=[outputwidth=100%]
    style(header column)=[asis=on just=l protectspecialchars=off] ;
 	columns pageno CustomerID visit TicketNumber Destination;
    define pageno     / order   order=internal noprint;
    define CustomerID   /  order 'Customer ID' style(header)={just=l} style(column)=[just=l cellwidth=6%] group id;
    define visit	  / group 'Visit' style(header)={just=l} style(column)=[just=l cellwidth=5.1%];
    define TicketNumber	  / group 'ticket number'  style(column)=[just=l cellwidth=2 %];
    define Destination   	  / group 'destination'  
						style(header)={just=l} style(column)=[just=l cellwidth= 3%];    
                       
    break after pageno/page;
 
 	compute after CustomerID /style=[protectspecialchars=off font_size=8pt font_face="Arial"
                                 font_weight=medium];
       line '';
    endcomp;
	compute before CustomerID /style=[protectspecialchars=off font_size=4pt font_face="Arial"
                                 font_weight=medium];
       line '';
    endcomp;

 run;
ods rtf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1738345290423.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104175i39E8F855B477BF89/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1738345290423.png" alt="SASuserlot_0-1738345290423.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 17:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/957827#M373875</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2025-01-31T17:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report : How to display the ID info after the Page Break when same ID info goes to next pag</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/957867#M373884</link>
      <description>&lt;P&gt;Have you seen this page?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Get-SUBJECT-id-to-show-on-each-page-of-a-listing-when-a-subjects/td-p/921637" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Get-SUBJECT-id-to-show-on-each-page-of-a-listing-when-a-subjects/td-p/921637&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You need to use the TAGSETS.RTF destination rather than RTF, and the SPANROWS option in PROC REPORT.&lt;/P&gt;
&lt;P&gt;These almost-but-not-quite-redundant ODS destinations are anything but clear tbh.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2025 02:19:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/957867#M373884</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2025-02-16T02:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report : How to display the ID info after the Page Break when same ID info goes to next pag</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/957958#M373910</link>
      <description>&lt;P&gt;Have you considered using a BY statement?&lt;/P&gt;
&lt;P&gt;That will free up more space for the details in Visit, Ticket and Destination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;    by CustomerId ;
    
options nobyline ;
title j=l f='Times' "#byvar1=#byval1"  ;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then either define CustomerId as NOPRINT or remove it from the COLUMNS list.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardAD_0-1738515434115.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104238i9FA724E3621AE955/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardAD_0-1738515434115.png" alt="RichardAD_0-1738515434115.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Feb 2025 16:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/957958#M373910</guid>
      <dc:creator>RichardAD</dc:creator>
      <dc:date>2025-02-02T16:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report : How to display the ID info after the Page Break when same ID info goes to next pag</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/958285#M374023</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;, Yes, I saw this page; since our RTF destinations come from the macros , I can not modify them to Tagsets; I ended up using the #byval concepts to display as subtitles. Thank you for your inputs.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 22:29:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/958285#M374023</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2025-02-04T22:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Report : How to display the ID info after the Page Break when same ID info goes to next pag</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/958286#M374024</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/300781"&gt;@RichardAD&lt;/a&gt;&amp;nbsp;. I ended up using this concept. I think we don't any option left other than this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 22:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Report-How-to-display-the-ID-info-after-the-Page-Break-when/m-p/958286#M374024</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2025-02-04T22:30:16Z</dc:date>
    </item>
  </channel>
</rss>

