<?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: Header in ODS PDF in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Header-in-ODS-PDF/m-p/37795#M5322</link>
    <description>Hi Cynthia, Scott,&lt;BR /&gt;
&lt;BR /&gt;
The code as requested.&lt;BR /&gt;
&lt;BR /&gt;
Code &lt;BR /&gt;
================================&lt;BR /&gt;
/*============================================================*/&lt;BR /&gt;
/* Search for NOBYLINES to address the problem for this report*/&lt;BR /&gt;
/*============================================================*/&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
options nobyline nonumber linesize=100 pagesize=60 nocenter nodate;&lt;BR /&gt;
&lt;BR /&gt;
ODS PATH work.templat(update) sasuser.templat(read)&lt;BR /&gt;
               sashelp.tmplmst(read);&lt;BR /&gt;
&lt;BR /&gt;
proc template;&lt;BR /&gt;
define style border;&lt;BR /&gt;
parent=Styles.Printer;&lt;BR /&gt;
replace table from table /&lt;BR /&gt;
     borderwidth=0.0&lt;BR /&gt;
	      ;&lt;BR /&gt;
replace header from header / &lt;BR /&gt;
background=grayff;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* Calculate the sysdate value in the format requireda  and store */&lt;BR /&gt;
/* it in the macro variable to be used in the TITLE statement     */&lt;BR /&gt;
data _null_;&lt;BR /&gt;
	call symput('_sysdate',put(input("&amp;amp;sysdate.",date7.),ddmmyyp10.));&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ODS _ALL_ CLOSE;&lt;BR /&gt;
*FILENAME EGPDF 'test.pdf';&lt;BR /&gt;
*ODS PDF(ID=EGPDF) &lt;BR /&gt;
    FILE=EGPDF &lt;BR /&gt;
    NOTOC &lt;BR /&gt;
    STYLE=border ;&lt;BR /&gt;
ods pdf file="RD035.pdf" notoc style = border;	&lt;BR /&gt;
	&lt;BR /&gt;
    ;&lt;BR /&gt;
ods escapechar ='~';&lt;BR /&gt;
&lt;BR /&gt;
title1  &lt;BR /&gt;
    justify = c font=Helvetica height=9pt bold  '#ByVal1'   ;&lt;BR /&gt;
&lt;BR /&gt;
title2  &lt;BR /&gt;
	justify = l font=arial     height=8pt       '#ByVal2 '&lt;BR /&gt;
	justify = r font=arial     height=8pt       "Utskriftsdato: &amp;amp;_sysdate. kl &amp;amp;systime.  side ~{thispage} av ~{lastpage} ";&lt;BR /&gt;
title3;&lt;BR /&gt;
title4 &lt;BR /&gt;
	justify = l font=arial     height=8pt       '#byval3'  &lt;BR /&gt;
	justify = r font=arial     height=8pt       'Reolnr: #byval4';&lt;BR /&gt;
title5 &lt;BR /&gt;
	justify = l font=arial     height=8pt       'Ehnet: #byval5'&lt;BR /&gt;
	justify = r font=arial     height=8pt       'Romnr: #byval6';&lt;BR /&gt;
&lt;BR /&gt;
title6 &lt;BR /&gt;
	justify = l font=arial     height=8pt       'RUTENR: #byval7';&lt;BR /&gt;
&lt;BR /&gt;
title7 '_____________________________________________________________________________________';&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
footnote1 ;&lt;BR /&gt;
footnote2;&lt;BR /&gt;
footnote3;&lt;BR /&gt;
footnote4;&lt;BR /&gt;
footnote5;&lt;BR /&gt;
footnote6;&lt;BR /&gt;
footnote7;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc report data = VL0608_106R_Sat_closed_mailbox nowd spacing = 30 wrap ls=100 &lt;BR /&gt;
	style(summary)={htmlstyle="border-top:solid;border-bottom:solid"} split='*';&lt;BR /&gt;
&lt;BR /&gt;
	By Report_Name Report_Id Title_Line2 Rack_Id Organization_Long_Nm Room_Id Route_Id;&lt;BR /&gt;
	column&lt;BR /&gt;
		Report_Name&lt;BR /&gt;
		Report_Id&lt;BR /&gt;
		Title_Line2&lt;BR /&gt;
		Rack_Id&lt;BR /&gt;
		Organization_Long_Nm&lt;BR /&gt;
		Room_Id&lt;BR /&gt;
		Route_Id&lt;BR /&gt;
		Stop_Nm&lt;BR /&gt;
		Stop_Site_Id&lt;BR /&gt;
		Mailbox_attr&lt;BR /&gt;
		Party_name&lt;BR /&gt;
		Adress_Nm_long&lt;BR /&gt;
&lt;BR /&gt;
	;&lt;BR /&gt;
&lt;BR /&gt;
	define Report_ID/group noprint;&lt;BR /&gt;
	define Report_name/group noprint;&lt;BR /&gt;
	define title_Line2/noprint;&lt;BR /&gt;
&lt;BR /&gt;
	define Rack_Id/group noprint;&lt;BR /&gt;
	define Organization_Long_Nm/group noprint;&lt;BR /&gt;
	define Room_Id/group noprint;&lt;BR /&gt;
	define Route_Id/group noprint;&lt;BR /&gt;
&lt;BR /&gt;
	define Stop_Nm/order left "STOPNAVN" &lt;BR /&gt;
					style(column)=[cellwidth=100pt font=(Arial, 6pt) just = left] flow&lt;BR /&gt;
					style(header)= [font_weight=bold font=(Arial, 6pt) just = left] flow;&lt;BR /&gt;
&lt;BR /&gt;
	define Stop_Site_Id/ order left "ST NR" &lt;BR /&gt;
					style(column)=[cellwidth=50pt font=(Arial, 6pt) just = left] flow&lt;BR /&gt;
					style(header)= [font_weight=bold font=(Arial, 6pt) just = left] flow;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
	define Mailbox_attr/ display left "L NR" &lt;BR /&gt;
					style(column)=[cellwidth=50pt font=(Arial, 6pt) just = left] flow&lt;BR /&gt;
					style(header)= [font_weight=bold font=(Arial, 6pt) just = left] flow;&lt;BR /&gt;
&lt;BR /&gt;
	define Party_name/ display left "NAVN" &lt;BR /&gt;
					style(column)=[cellwidth=150pt font=(Arial, 6pt) just = left] flow&lt;BR /&gt;
					style(header)= [font_weight=bold font=(Arial, 6pt) just = left] flow;&lt;BR /&gt;
&lt;BR /&gt;
	define Adress_Nm_long/ display left "ADRESSE" &lt;BR /&gt;
					style(column)=[cellwidth=200pt font=(Arial, 6pt) just = left] flow&lt;BR /&gt;
					style(header)= [font_weight=bold font=(Arial, 6pt) just = left] flow;&lt;BR /&gt;
	break after Stop_Nm/skip ol suppress;&lt;BR /&gt;
&lt;BR /&gt;
	compute after Stop_Nm;&lt;BR /&gt;
  		line ' ';&lt;BR /&gt;
	endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ODS _all_ close;&lt;BR /&gt;
&lt;BR /&gt;
================================</description>
    <pubDate>Fri, 08 Jan 2010 07:50:09 GMT</pubDate>
    <dc:creator>RussellAlmeida</dc:creator>
    <dc:date>2010-01-08T07:50:09Z</dc:date>
    <item>
      <title>Header in ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Header-in-ODS-PDF/m-p/37792#M5319</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Version: SAS 9.1.3&lt;BR /&gt;
Operating System : AIX&lt;BR /&gt;
Procedure: ODS PDF with Proc Report.&lt;BR /&gt;
&lt;BR /&gt;
I have a report where i have to print dynamic values in the report header, this is easily done using the #ByVal feature.&lt;BR /&gt;
&lt;BR /&gt;
My requirement is the following&lt;BR /&gt;
Country   :&amp;lt;#ByVAL1&amp;gt;.............................State   : &lt;BYVAL2&gt;&lt;BR /&gt;
District    :&amp;lt;#ByVAL3&amp;gt;.............................Village: &lt;BYVAL4&gt;&lt;BR /&gt;
&lt;BR /&gt;
ie &lt;BR /&gt;
Field1: VAL1--------------------------------------Field2 : VALUE2&lt;BR /&gt;
Field3: VAL2--------------------------------------Field4 : VAL4 &lt;BR /&gt;
&lt;BR /&gt;
The values should come one under the other, i have applied style with the option Justify = l, c, r but then the values dont fall one below the other&lt;BR /&gt;
&lt;BR /&gt;
Please suggest&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
Russell

Message was edited by: Russell Almeida&lt;/BYVAL4&gt;&lt;/BYVAL2&gt;</description>
      <pubDate>Thu, 07 Jan 2010 16:18:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Header-in-ODS-PDF/m-p/37792#M5319</guid>
      <dc:creator>RussellAlmeida</dc:creator>
      <dc:date>2010-01-07T16:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Header in ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Header-in-ODS-PDF/m-p/37793#M5320</link>
      <description>Share the code you are using which doesn't work to meet your needs.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 07 Jan 2010 18:29:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Header-in-ODS-PDF/m-p/37793#M5320</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-01-07T18:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Header in ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Header-in-ODS-PDF/m-p/37794#M5321</link>
      <description>Hi:&lt;BR /&gt;
&lt;BR /&gt;
  Any 2 Title statements will not "line up" with each other because by default the font for PDF is a proportional spaced font, in which the letter 'i' will take up less space in the title area than the letter 'w'.&lt;BR /&gt;
For example...consider the following 2 lines of 20 'i' and 20 'w' characters each followed by 5 spaces and then the same text:&lt;BR /&gt;
iiiiiiiiiiiiiiiiiiii     It is going to snow.&lt;BR /&gt;
wwwwwwwwwwwwwwwwwwww     It is going to snow.&lt;BR /&gt;
 &lt;BR /&gt;
Because the 20 'i' characters take up less space on a line with a proportional font, the string "It is going to snow" on the first line will never line up with the same text on the second line -- by default. That is the nature of proportional fonts.&lt;BR /&gt;
   &lt;BR /&gt;
  In addition, the SAS Title will rarely "line up" with the report columns in the main report area with PROC REPORT because the Title text is styled with a larger font than the font used for the headers or data cells.&lt;BR /&gt;
 &lt;BR /&gt;
  I also do not understand what you mean by saying that you are achieving your results using #BYVAL...you show the '#' for #BYVAL1 and #BYVAL3, but not for BYVAL2 and BYVAL4 -- so I doubt that you are getting accurate results.&lt;BR /&gt;
 &lt;BR /&gt;
  If you could show an example of your code and an example of some data, that would be very useful. This previous forum posting is very useful in understanding how to post code snippets in order to maintain the indenting and any special characters:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=27609毙" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=27609毙&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 08 Jan 2010 01:48:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Header-in-ODS-PDF/m-p/37794#M5321</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-01-08T01:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Header in ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Header-in-ODS-PDF/m-p/37795#M5322</link>
      <description>Hi Cynthia, Scott,&lt;BR /&gt;
&lt;BR /&gt;
The code as requested.&lt;BR /&gt;
&lt;BR /&gt;
Code &lt;BR /&gt;
================================&lt;BR /&gt;
/*============================================================*/&lt;BR /&gt;
/* Search for NOBYLINES to address the problem for this report*/&lt;BR /&gt;
/*============================================================*/&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
options nobyline nonumber linesize=100 pagesize=60 nocenter nodate;&lt;BR /&gt;
&lt;BR /&gt;
ODS PATH work.templat(update) sasuser.templat(read)&lt;BR /&gt;
               sashelp.tmplmst(read);&lt;BR /&gt;
&lt;BR /&gt;
proc template;&lt;BR /&gt;
define style border;&lt;BR /&gt;
parent=Styles.Printer;&lt;BR /&gt;
replace table from table /&lt;BR /&gt;
     borderwidth=0.0&lt;BR /&gt;
	      ;&lt;BR /&gt;
replace header from header / &lt;BR /&gt;
background=grayff;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* Calculate the sysdate value in the format requireda  and store */&lt;BR /&gt;
/* it in the macro variable to be used in the TITLE statement     */&lt;BR /&gt;
data _null_;&lt;BR /&gt;
	call symput('_sysdate',put(input("&amp;amp;sysdate.",date7.),ddmmyyp10.));&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
ODS _ALL_ CLOSE;&lt;BR /&gt;
*FILENAME EGPDF 'test.pdf';&lt;BR /&gt;
*ODS PDF(ID=EGPDF) &lt;BR /&gt;
    FILE=EGPDF &lt;BR /&gt;
    NOTOC &lt;BR /&gt;
    STYLE=border ;&lt;BR /&gt;
ods pdf file="RD035.pdf" notoc style = border;	&lt;BR /&gt;
	&lt;BR /&gt;
    ;&lt;BR /&gt;
ods escapechar ='~';&lt;BR /&gt;
&lt;BR /&gt;
title1  &lt;BR /&gt;
    justify = c font=Helvetica height=9pt bold  '#ByVal1'   ;&lt;BR /&gt;
&lt;BR /&gt;
title2  &lt;BR /&gt;
	justify = l font=arial     height=8pt       '#ByVal2 '&lt;BR /&gt;
	justify = r font=arial     height=8pt       "Utskriftsdato: &amp;amp;_sysdate. kl &amp;amp;systime.  side ~{thispage} av ~{lastpage} ";&lt;BR /&gt;
title3;&lt;BR /&gt;
title4 &lt;BR /&gt;
	justify = l font=arial     height=8pt       '#byval3'  &lt;BR /&gt;
	justify = r font=arial     height=8pt       'Reolnr: #byval4';&lt;BR /&gt;
title5 &lt;BR /&gt;
	justify = l font=arial     height=8pt       'Ehnet: #byval5'&lt;BR /&gt;
	justify = r font=arial     height=8pt       'Romnr: #byval6';&lt;BR /&gt;
&lt;BR /&gt;
title6 &lt;BR /&gt;
	justify = l font=arial     height=8pt       'RUTENR: #byval7';&lt;BR /&gt;
&lt;BR /&gt;
title7 '_____________________________________________________________________________________';&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
footnote1 ;&lt;BR /&gt;
footnote2;&lt;BR /&gt;
footnote3;&lt;BR /&gt;
footnote4;&lt;BR /&gt;
footnote5;&lt;BR /&gt;
footnote6;&lt;BR /&gt;
footnote7;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc report data = VL0608_106R_Sat_closed_mailbox nowd spacing = 30 wrap ls=100 &lt;BR /&gt;
	style(summary)={htmlstyle="border-top:solid;border-bottom:solid"} split='*';&lt;BR /&gt;
&lt;BR /&gt;
	By Report_Name Report_Id Title_Line2 Rack_Id Organization_Long_Nm Room_Id Route_Id;&lt;BR /&gt;
	column&lt;BR /&gt;
		Report_Name&lt;BR /&gt;
		Report_Id&lt;BR /&gt;
		Title_Line2&lt;BR /&gt;
		Rack_Id&lt;BR /&gt;
		Organization_Long_Nm&lt;BR /&gt;
		Room_Id&lt;BR /&gt;
		Route_Id&lt;BR /&gt;
		Stop_Nm&lt;BR /&gt;
		Stop_Site_Id&lt;BR /&gt;
		Mailbox_attr&lt;BR /&gt;
		Party_name&lt;BR /&gt;
		Adress_Nm_long&lt;BR /&gt;
&lt;BR /&gt;
	;&lt;BR /&gt;
&lt;BR /&gt;
	define Report_ID/group noprint;&lt;BR /&gt;
	define Report_name/group noprint;&lt;BR /&gt;
	define title_Line2/noprint;&lt;BR /&gt;
&lt;BR /&gt;
	define Rack_Id/group noprint;&lt;BR /&gt;
	define Organization_Long_Nm/group noprint;&lt;BR /&gt;
	define Room_Id/group noprint;&lt;BR /&gt;
	define Route_Id/group noprint;&lt;BR /&gt;
&lt;BR /&gt;
	define Stop_Nm/order left "STOPNAVN" &lt;BR /&gt;
					style(column)=[cellwidth=100pt font=(Arial, 6pt) just = left] flow&lt;BR /&gt;
					style(header)= [font_weight=bold font=(Arial, 6pt) just = left] flow;&lt;BR /&gt;
&lt;BR /&gt;
	define Stop_Site_Id/ order left "ST NR" &lt;BR /&gt;
					style(column)=[cellwidth=50pt font=(Arial, 6pt) just = left] flow&lt;BR /&gt;
					style(header)= [font_weight=bold font=(Arial, 6pt) just = left] flow;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
	define Mailbox_attr/ display left "L NR" &lt;BR /&gt;
					style(column)=[cellwidth=50pt font=(Arial, 6pt) just = left] flow&lt;BR /&gt;
					style(header)= [font_weight=bold font=(Arial, 6pt) just = left] flow;&lt;BR /&gt;
&lt;BR /&gt;
	define Party_name/ display left "NAVN" &lt;BR /&gt;
					style(column)=[cellwidth=150pt font=(Arial, 6pt) just = left] flow&lt;BR /&gt;
					style(header)= [font_weight=bold font=(Arial, 6pt) just = left] flow;&lt;BR /&gt;
&lt;BR /&gt;
	define Adress_Nm_long/ display left "ADRESSE" &lt;BR /&gt;
					style(column)=[cellwidth=200pt font=(Arial, 6pt) just = left] flow&lt;BR /&gt;
					style(header)= [font_weight=bold font=(Arial, 6pt) just = left] flow;&lt;BR /&gt;
	break after Stop_Nm/skip ol suppress;&lt;BR /&gt;
&lt;BR /&gt;
	compute after Stop_Nm;&lt;BR /&gt;
  		line ' ';&lt;BR /&gt;
	endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ODS _all_ close;&lt;BR /&gt;
&lt;BR /&gt;
================================</description>
      <pubDate>Fri, 08 Jan 2010 07:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Header-in-ODS-PDF/m-p/37795#M5322</guid>
      <dc:creator>RussellAlmeida</dc:creator>
      <dc:date>2010-01-08T07:50:09Z</dc:date>
    </item>
  </channel>
</rss>

