<?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: Title in PDF file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/426015#M104944</link>
    <description>&lt;P&gt;Yes it does, thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jan 2018 10:07:55 GMT</pubDate>
    <dc:creator>Num19</dc:creator>
    <dc:date>2018-01-09T10:07:55Z</dc:date>
    <item>
      <title>Title in PDF file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/425982#M104931</link>
      <description>&lt;P&gt;Hi, I would like to insert a title in each page of my PDF file depending on values from a variable, I tried this :&lt;/P&gt;&lt;PRE&gt;PROC SORT DATA=tab;
BY var1;
RUN;

ODS PDF FILE="C:\Users\User\Desktop\File.pdf" STYLE=PEARL STARTPAGE=BYGROUP;
title CATX(" - ","Results of the game", var1);
PROC PRINT DATA=tab (FIRSTOBS=2) sumlabel="Totals" label NOOBS;
VAR var2-var5;
BY var1;
sum var2-var4;
RUN;
ODS PDF CLOSE;


&lt;/PRE&gt;&lt;P&gt;However I have literally this title :&lt;/P&gt;&lt;PRE&gt;CATX(" - ","Results of the game", var1)&lt;/PRE&gt;&lt;P&gt;instead of :&lt;/P&gt;&lt;PRE&gt;Results of the game - game 1&lt;/PRE&gt;&lt;P&gt;(For the first game for example)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 08:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/425982#M104931</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-09T08:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Title in PDF file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/425989#M104933</link>
      <description>&lt;P&gt;You can not use functions in a title statement like that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do somethind like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
	MyTitle=CATX(" - ","Results of the game", var1);
	call symputx("MyTitle", MyTitle);
run;

title "&amp;amp;MyTitle.";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jan 2018 08:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/425989#M104933</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-01-09T08:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Title in PDF file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/425990#M104934</link>
      <description>&lt;P&gt;I have a title like : "Results of the game - .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var1=game1&amp;nbsp; "&lt;/P&gt;&lt;P&gt;at each page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 08:42:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/425990#M104934</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-09T08:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Title in PDF file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/425993#M104937</link>
      <description>&lt;P&gt;Use By Grouping - it is a key feature of SAS and will make your coding life much easier (and not coding in upper case or mixed case will help my eyesight!!!):&lt;/P&gt;
&lt;PRE&gt;ods pdf file="c:\users\user\desktop\file.pdf" style=pearl startpage=bygroup;
proc print data=tab (firstobs=2) sumlabel="Totals" label noobs;
  var var2-var5;
  by var1;
  title "Results of the game - #byvar1";
  sum var2-var4;
run;
ods pdf close;&lt;/PRE&gt;
&lt;P&gt;Note specifically the #byvar1, you could also use #byval1.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 08:58:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/425993#M104937</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-01-09T08:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Title in PDF file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/426004#M104940</link>
      <description>&lt;P&gt;It stil does'nt work, I have a title like this one :&lt;/P&gt;&lt;PRE&gt;Results of the game - #byvar1&lt;/PRE&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 09:32:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/426004#M104940</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-09T09:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Title in PDF file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/426012#M104943</link>
      <description>&lt;P&gt;It should work, try:&lt;/P&gt;
&lt;PRE&gt;options nobyline;

ods pdf file="s:\temp\file.pdf" style=pearl startpage=bygroup;

proc sort data=sashelp.class out=class;
  by sex;
run;

proc print data=class (firstobs=2) sumlabel="Totals" label noobs;
  var _all_;
  by sex;
  title "Results of the game - #byval1";
run;
ods pdf close;&lt;/PRE&gt;
&lt;P&gt;Oh, and "it doesn't work" - doesn't help.&amp;nbsp; Post your code in full and test data which shows the operation as a datastep.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 09:48:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/426012#M104943</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-01-09T09:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Title in PDF file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/426015#M104944</link>
      <description>&lt;P&gt;Yes it does, thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 10:07:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Title-in-PDF-file/m-p/426015#M104944</guid>
      <dc:creator>Num19</dc:creator>
      <dc:date>2018-01-09T10:07:55Z</dc:date>
    </item>
  </channel>
</rss>

