<?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 Using proc report how can you generate a pdf with repeated columns and values in all pages in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-proc-report-how-can-you-generate-a-pdf-with-repeated/m-p/934564#M367504</link>
    <description>&lt;P&gt;The table produced has many columns. Is there a way to display a pdf where the first 4 columns are repeated in all pages? There are many more columns after position and many more rows. I have the following code but it is not working:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data sample;
input ID $ Name $ Age Salary Department $ Position $;
datalines;
1 John 30 50000 HR Manager
2 Jane 25 55000 Finance Analyst
3 Jack 40 60000 IT Developer
4 Jill 35 62000 Marketing Specialist
;
run;

ods pdf file='C:\path\to\your\output.pdf';

proc report data=sample nowd split='_';
    column ID Name Age Salary Department Position;
    define ID / 'ID' left;
    define Name / 'Name' left;
    define Age / 'Age' center;
    define Salary / 'Salary' right;
    define Department / 'Department' left;
    define Position / 'Position' left;
    
    /* Specify the columns to be repeated */
    compute after _page_;
        line ' ';
        line 'ID     Name     Age     Salary';
    endcomp;
run;

/* Close ODS PDF destination */
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 03 Jul 2024 15:09:08 GMT</pubDate>
    <dc:creator>ANKH1</dc:creator>
    <dc:date>2024-07-03T15:09:08Z</dc:date>
    <item>
      <title>Using proc report how can you generate a pdf with repeated columns and values in all pages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-proc-report-how-can-you-generate-a-pdf-with-repeated/m-p/934564#M367504</link>
      <description>&lt;P&gt;The table produced has many columns. Is there a way to display a pdf where the first 4 columns are repeated in all pages? There are many more columns after position and many more rows. I have the following code but it is not working:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data sample;
input ID $ Name $ Age Salary Department $ Position $;
datalines;
1 John 30 50000 HR Manager
2 Jane 25 55000 Finance Analyst
3 Jack 40 60000 IT Developer
4 Jill 35 62000 Marketing Specialist
;
run;

ods pdf file='C:\path\to\your\output.pdf';

proc report data=sample nowd split='_';
    column ID Name Age Salary Department Position;
    define ID / 'ID' left;
    define Name / 'Name' left;
    define Age / 'Age' center;
    define Salary / 'Salary' right;
    define Department / 'Department' left;
    define Position / 'Position' left;
    
    /* Specify the columns to be repeated */
    compute after _page_;
        line ' ';
        line 'ID     Name     Age     Salary';
    endcomp;
run;

/* Close ODS PDF destination */
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Jul 2024 15:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-proc-report-how-can-you-generate-a-pdf-with-repeated/m-p/934564#M367504</guid>
      <dc:creator>ANKH1</dc:creator>
      <dc:date>2024-07-03T15:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using proc report how can you generate a pdf with repeated columns and values in all pages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-proc-report-how-can-you-generate-a-pdf-with-repeated/m-p/934645#M367517</link>
      <description>&lt;P&gt;Using ID + PAGE option :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
input ID $ Name $ Age Salary Department $ Position $;
datalines;
1 John 30 50000 HR Manager
2 Jane 25 55000 Finance Analyst
3 Jack 40 60000 IT Developer
4 Jill 35 62000 Marketing Specialist
;
run;

ods pdf file='C:\temp\output.pdf';

proc report data=sample nowd split='_';
    column ID Name Age Salary Department Position;
    define ID / 'ID' left   ;
    define Name / 'Name' left  ID ;
    define Age / 'Age' center;
    define Salary / 'Salary' right;
    define Department / 'Department' left PAGE;
    define Position / 'Position' left;
    
    /* Specify the columns to be repeated */
    compute after _page_;
        line ' ';
        line 'ID     Name     Age     Salary';
    endcomp;
run;

/* Close ODS PDF destination */
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jul 2024 02:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-proc-report-how-can-you-generate-a-pdf-with-repeated/m-p/934645#M367517</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-07-04T02:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using proc report how can you generate a pdf with repeated columns and values in all pages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-proc-report-how-can-you-generate-a-pdf-with-repeated/m-p/934690#M367527</link>
      <description>Thank you!</description>
      <pubDate>Thu, 04 Jul 2024 14:00:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-proc-report-how-can-you-generate-a-pdf-with-repeated/m-p/934690#M367527</guid>
      <dc:creator>ANKH1</dc:creator>
      <dc:date>2024-07-04T14:00:59Z</dc:date>
    </item>
  </channel>
</rss>

