<?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: #byval in header using ODS RTF in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/byval-in-header-using-ODS-RTF/m-p/811772#M320226</link>
    <description>&lt;BR /&gt;Hi:&lt;BR /&gt;  In that example, the Year and Quarter were only shown in a TITLE statement so that the HEADER text could be verified as correct. My previous program does create a PGSTR text item that can be used in the LINE statement in the COMPUTE BEFORE block. Note that I have both YEAR and QTR as GROUP items with a page option, so that the COMPUTE BEFORE _PAGE_ will cause the PGSTR to be used in the HEADER at the change of the YEAR and QTR.&lt;BR /&gt;  I see that you have BYVAR, PAGEIT and SUBJID as ORDER items, but none of them will cause a page break when they change. You did not use the PAGE option like I did in my code. Is that because you really meant to have COMPUTE BEFORE BYVAR or COMPUTE BEDORE PAGEIT??? &lt;BR /&gt;  The challenge is that if you want to have the information as a header, sitting on top of the table on each page, then you need to have a page item in PROC REPORT. I don't see where you have that. &lt;BR /&gt;  Also notice in my earlier program, I have break before year/page. You try to do break before _page_...that won't work. _PAGE_ is a location that is reserved to a COMPUTE block. Again, I would expect to see you have break before BYVAR/page or break before PAGEIT/page or break before SUBJID/page instead of what you have. If I understand your logic, then you have BYVAR, PAGEIT and SUBJID as your NOPRINT items. So it seems to me that you want to have a new page start for every SUBJID? Then a subject can have multiple pages AND multiple by values? That doesn't seem quite right to me if you want the page header to be subjid, age sex and race.&lt;BR /&gt;  But without data to test with or look at, it's hard to provide a context for your code.&lt;BR /&gt;Cynthia</description>
    <pubDate>Thu, 05 May 2022 22:52:52 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2022-05-05T22:52:52Z</dc:date>
    <item>
      <title>#byval in header using ODS RTF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/byval-in-header-using-ODS-RTF/m-p/811740#M320203</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;Hi, I am trying to use something analogous to #byval where in I want the text to appear as the header and not title. I am trying to follow the solution given by Cynthia here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/re-byval-in-header/td-p/316108" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/re-byval-in-header/td-p/316108&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;however _page_ is not resolved in my code and i cant achieve it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report nowindows data=list_ae split='|' missing style(report)=[width=100% cellpadding=0]&lt;BR /&gt;style (column)=[protectspecialchars=off asis=on just=c] style(header)=[asis=on just=c];&lt;BR /&gt;by byvar;&lt;BR /&gt;column ("@R'\fs3\brdrb\brdrs\brdrw40" byvar pageit subjid age sex race aestdtc aeendtc aetext flag aeong_std) ;&lt;/P&gt;&lt;P&gt;define byvar / order order=internal noprint;&lt;BR /&gt;define pageit / order order=internal noprint;&lt;BR /&gt;define subjid/order order=internal noprint;&lt;/P&gt;&lt;P&gt;define aestdtc /display style(column)=[just=c width=10% rightmargin=1%] "AE Start Date";&lt;BR /&gt;define aeendtc /display style(column)=[just=c width=10%] "AE End Date";&lt;BR /&gt;define aetext /display style(column)=[just=c width=20%] "AE Body System Code/|AE Preferred Term/|Verbatim Term";&lt;BR /&gt;define aeong_std /display style(column)=[just=c width=8%] "Ongoing?";&lt;BR /&gt;*define aeterm /display style(column)=[just=c width=8%] "AE Verbatim Term";&lt;BR /&gt;define flag /display style(column)=[just=c width=8%] "Treatment Emergent|Serious|Dose Limiting Toxicity";&lt;BR /&gt;break after _page_/page;&lt;BR /&gt;compute before _page_ ;&lt;BR /&gt;pgstr=catx('\',subjid,age,sex,race);&lt;BR /&gt;line pgstr $varying100.;&lt;BR /&gt;&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i get the following error&lt;/P&gt;&lt;P&gt;22759&lt;BR /&gt;22760 compute after pageit / style={just=l};&lt;BR /&gt;22761 line&lt;BR /&gt;22761! "____________________________________________________________________________________________________________________________&lt;BR /&gt;22761! ____________________";&lt;BR /&gt;22762 line "%str(Note: Treatment-Emergent Adverse Events is defined as any event that occurs on or after the first dose of&lt;BR /&gt;22762! study drug administration or any pre-existing event which worsened in severity after dosing.)";&lt;BR /&gt;22763 line "%str(Note: Coding used MedDRA version 23.0)";&lt;BR /&gt;22764 line "%str(Note: Safety Population = Subjects with at least one dose Dose groups represent subjects initial dose)";&lt;BR /&gt;22765 endcomp;&lt;BR /&gt;22766&lt;BR /&gt;22767 run;&lt;/P&gt;&lt;P&gt;ERROR: The BREAK variable _page_ is not one of the GROUP or&lt;BR /&gt;ORDER variables.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;22768&lt;BR /&gt;22769 ods rtf close;&lt;BR /&gt;22770 ods listing close;&lt;BR /&gt;22771&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried making an artificial pageit variable but i still dont get desired output. No error either.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 19:39:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/byval-in-header-using-ODS-RTF/m-p/811740#M320203</guid>
      <dc:creator>s_garg17</dc:creator>
      <dc:date>2022-05-05T19:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: #byval in header using ODS RTF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/byval-in-header-using-ODS-RTF/m-p/811771#M320225</link>
      <description>&lt;BR /&gt;Hi:&lt;BR /&gt;  In that example, the Year and Quarter were only shown in a TITLE statement so that the HEADER text could be verified as correct. My previous program does create a PGSTR text item that can be used in the LINE statement in the COMPUTE BEFORE block. Note that I have both YEAR and QTR as GROUP items with a page option, so that the COMPUTE BEFORE _PAGE_ will cause the PGSTR to be used in the HEADER at the change of the YEAR and QTR.&lt;BR /&gt;  I see that you have BYVAR, PAGEIT and SUBJID as ORDER items, but none of them will cause a page break when they change. You did not use the PAGE option like I did in my code. Is that because you really meant to have COMPUTE BEFORE BYVAR or COMPUTE BEDORE PAGEIT??? &lt;BR /&gt;  The challenge is that if you want to have the information as a header, sitting on top of the table on each page, then you need to have a page item in PROC REPORT. I don't see where you have that. &lt;BR /&gt;  Also notice in my earlier program, I have break before year/page. You try to do break before _page_...that won't work. _PAGE_ is a location that is reserved to a COMPUTE block. Again, I would expect to see you have break before BYVAR/page or break before PAGEIT/page or break before SUBJID/page instead of what you have. If I understand your logic, then you have BYVAR, PAGEIT and SUBJID as your NOPRINT items. So it seems to me that you want to have a new page start for every SUBJID? Then a subject can have multiple pages AND multiple by values? That doesn't seem quite right to me if you want the page header to be subjid, age sex and race.&lt;BR /&gt;  But without data to test with or look at, it's hard to provide a context for your code.&lt;BR /&gt;Cynthia</description>
      <pubDate>Thu, 05 May 2022 22:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/byval-in-header-using-ODS-RTF/m-p/811771#M320225</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-05-05T22:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: #byval in header using ODS RTF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/byval-in-header-using-ODS-RTF/m-p/811772#M320226</link>
      <description>&lt;BR /&gt;Hi:&lt;BR /&gt;  In that example, the Year and Quarter were only shown in a TITLE statement so that the HEADER text could be verified as correct. My previous program does create a PGSTR text item that can be used in the LINE statement in the COMPUTE BEFORE block. Note that I have both YEAR and QTR as GROUP items with a page option, so that the COMPUTE BEFORE _PAGE_ will cause the PGSTR to be used in the HEADER at the change of the YEAR and QTR.&lt;BR /&gt;  I see that you have BYVAR, PAGEIT and SUBJID as ORDER items, but none of them will cause a page break when they change. You did not use the PAGE option like I did in my code. Is that because you really meant to have COMPUTE BEFORE BYVAR or COMPUTE BEDORE PAGEIT??? &lt;BR /&gt;  The challenge is that if you want to have the information as a header, sitting on top of the table on each page, then you need to have a page item in PROC REPORT. I don't see where you have that. &lt;BR /&gt;  Also notice in my earlier program, I have break before year/page. You try to do break before _page_...that won't work. _PAGE_ is a location that is reserved to a COMPUTE block. Again, I would expect to see you have break before BYVAR/page or break before PAGEIT/page or break before SUBJID/page instead of what you have. If I understand your logic, then you have BYVAR, PAGEIT and SUBJID as your NOPRINT items. So it seems to me that you want to have a new page start for every SUBJID? Then a subject can have multiple pages AND multiple by values? That doesn't seem quite right to me if you want the page header to be subjid, age sex and race.&lt;BR /&gt;  But without data to test with or look at, it's hard to provide a context for your code.&lt;BR /&gt;Cynthia</description>
      <pubDate>Thu, 05 May 2022 22:52:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/byval-in-header-using-ODS-RTF/m-p/811772#M320226</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-05-05T22:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: #byval in header using ODS RTF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/byval-in-header-using-ODS-RTF/m-p/811782#M320233</link>
      <description>&lt;P&gt;Hi Cynthia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ok lets start fresh. My objective is to produce a header (not title) which is repeated on every page. It is like #byvar, but I want to use compute block instead cause of the location it gets printed. I am using ODS RTF. I want to have it outputted at either of the 2 locations. this "pgstr that I want to print has subjid in it, so ofcourse I want a page break as it changes.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="s_garg17_0-1651804241149.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71168i22D9B574FD00B0C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="s_garg17_0-1651804241149.png" alt="s_garg17_0-1651804241149.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I am using&lt;/P&gt;&lt;P&gt;I first create a pageit variable like this,&lt;/P&gt;&lt;P&gt;data list_Ae2;&lt;BR /&gt;set list_ae;&lt;BR /&gt;by subjid;&lt;BR /&gt;pageit=ceil(divide(_n_,9));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc report nowindows data=list_ae2 split='|' missing style(report)=[width=100% cellpadding=0]&lt;BR /&gt;style (column)=[protectspecialchars=off asis=on just=c] style(header)=[asis=on just=c];&lt;BR /&gt;by subjid pageit;&lt;BR /&gt;column ("@R'\fs3\brdrb\brdrs\brdrw40" pageit subjid age sex race aestdtc aeendtc aetext flag aeong_std aerel) ;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;define pageit / order page order=internal noprint;&lt;BR /&gt;define subjid/group page order order=internal noprint;&lt;BR /&gt;define age/group page order order=internal noprint;&lt;BR /&gt;define sex/group page order order=internal noprint;&lt;BR /&gt;define race/group page order order=internal noprint ;&lt;BR /&gt;&lt;BR /&gt;define aestdtc /display style(column)=[just=c width=10% rightmargin=1%] "AE Start Date";&lt;BR /&gt;define aeendtc /display style(column)=[just=c width=10%] "AE End Date";&lt;BR /&gt;define aetext /display style(column)=[just=c width=20%] "AE Body System Code/|AE Preferred Term/|Verbatim Term";&lt;BR /&gt;define aeong_std /display style(column)=[just=c width=8%] "Ongoing?";&lt;BR /&gt;*define aeterm /display style(column)=[just=c width=8%] "AE Verbatim Term";&lt;BR /&gt;define flag /display style(column)=[just=c width=8%] "Treatment Emergent|Serious|Dose Limiting Toxicity";&lt;BR /&gt;break after pageit/page;&lt;BR /&gt;compute before pageit ;&lt;BR /&gt;pgstr=catx('\',subjid,age,sex,race);&lt;BR /&gt;line pgstr $varying100.;&lt;BR /&gt;&lt;BR /&gt;endcomp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;compute after _page_ / style={just=l};&lt;BR /&gt;* line "________________________________________________________________________________________________________________________________________________";&lt;BR /&gt;line "%str(Note: Treatment-Emergent Adverse Events is defined as any event that occurs on or after the first dose of study drug administration or any pre-existing event which worsened in severity after dosing.)";&lt;BR /&gt;line "%str(Note: Coding used MedDRA version 23.0)";&lt;BR /&gt;line "%str(Note: Safety Population = Subjects with at least one dose Dose groups represent subjects initial dose)";&lt;BR /&gt;endcomp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not getting this pgstr getting printed at all.&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;</description>
      <pubDate>Fri, 06 May 2022 02:35:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/byval-in-header-using-ODS-RTF/m-p/811782#M320233</guid>
      <dc:creator>s_garg17</dc:creator>
      <dc:date>2022-05-06T02:35:56Z</dc:date>
    </item>
  </channel>
</rss>

