<?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 PDF ODS only lines up data on the first row in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-ODS-only-lines-up-data-on-the-first-row/m-p/308593#M17286</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to generate a ods pdf file and it is generating and the first row displays correctly.&amp;nbsp; The issue I'm having is the follow up rows are off by 1 space from lining up.&amp;nbsp;&amp;nbsp; I tried changing the indent and it didn't fix it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
*Create pdf ;
ods listing ; 
title ; 
footnote ;
options orientation=portrait 
		topmargin=.75in bottommargin=.75in rightmargin=.75in leftmargin=.75in 
		pageno=1 nodate nonumber nocenter 
	;
ods listing close ;
ods escapechar='^' ; 
ods pdf file = "c:\temp.pdf" notoc ;
footnote j=c height=8pt  font='Courier New' 'Page ^{thispage} of ^{lastpage}' ;

ods pdf startpage=now ;
ods pdf text="^S={font_size=16pt font_face='Times New Roman' fontweight=bold just=center}&amp;amp;title.^S={}" ;
ods pdf text="^2n" ;

data _null_ ;	    
	set temp end=lastObs ;
	by id ;
	declare odsout obj() ;		
	obj.table_start(overrides: 'frame=void rules=none cellpadding=0in cellspacing=.06in ' ) ;
	obj.body_start() ;
	
	if id=1 then do ;
		obj.row_start() ;
			obj.format_cell(text: "&amp;amp;heading.", overrides: "height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
		obj.row_end() ;
		obj.row_start() ;
			obj.format_cell(text: 'Varnum', overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
			obj.format_cell(text: 'Name',  overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
			obj.format_cell(text: 'Label', overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
		obj.row_end() ;		
	end ;
				
	obj.row_start() ;
		obj.format_cell(text: varid, overrides: "indent=40 height=.06in cellwidth=1in backgroundcolor=white just=left font_face='Courier New' font_size=9pt ") ;								
		obj.format_cell(text: varname, overrides: "indent=40 height=.06in cellwidth=1in backgroundcolor=white just=left font_face='Courier New' font_size=9pt ") ;								
		obj.format_cell(text: varlabel,  overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' font_size=9pt ") ;								
	obj.row_end() ;

	if last.id then do ;
		obj.body_end() ;
		obj.table_end() ;
	end ;
run ;

ods pdf close ;
ods listing ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Nov 2016 18:37:22 GMT</pubDate>
    <dc:creator>jerry898969</dc:creator>
    <dc:date>2016-11-01T18:37:22Z</dc:date>
    <item>
      <title>PDF ODS only lines up data on the first row</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-ODS-only-lines-up-data-on-the-first-row/m-p/308593#M17286</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to generate a ods pdf file and it is generating and the first row displays correctly.&amp;nbsp; The issue I'm having is the follow up rows are off by 1 space from lining up.&amp;nbsp;&amp;nbsp; I tried changing the indent and it didn't fix it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
*Create pdf ;
ods listing ; 
title ; 
footnote ;
options orientation=portrait 
		topmargin=.75in bottommargin=.75in rightmargin=.75in leftmargin=.75in 
		pageno=1 nodate nonumber nocenter 
	;
ods listing close ;
ods escapechar='^' ; 
ods pdf file = "c:\temp.pdf" notoc ;
footnote j=c height=8pt  font='Courier New' 'Page ^{thispage} of ^{lastpage}' ;

ods pdf startpage=now ;
ods pdf text="^S={font_size=16pt font_face='Times New Roman' fontweight=bold just=center}&amp;amp;title.^S={}" ;
ods pdf text="^2n" ;

data _null_ ;	    
	set temp end=lastObs ;
	by id ;
	declare odsout obj() ;		
	obj.table_start(overrides: 'frame=void rules=none cellpadding=0in cellspacing=.06in ' ) ;
	obj.body_start() ;
	
	if id=1 then do ;
		obj.row_start() ;
			obj.format_cell(text: "&amp;amp;heading.", overrides: "height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
		obj.row_end() ;
		obj.row_start() ;
			obj.format_cell(text: 'Varnum', overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
			obj.format_cell(text: 'Name',  overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
			obj.format_cell(text: 'Label', overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
		obj.row_end() ;		
	end ;
				
	obj.row_start() ;
		obj.format_cell(text: varid, overrides: "indent=40 height=.06in cellwidth=1in backgroundcolor=white just=left font_face='Courier New' font_size=9pt ") ;								
		obj.format_cell(text: varname, overrides: "indent=40 height=.06in cellwidth=1in backgroundcolor=white just=left font_face='Courier New' font_size=9pt ") ;								
		obj.format_cell(text: varlabel,  overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' font_size=9pt ") ;								
	obj.row_end() ;

	if last.id then do ;
		obj.body_end() ;
		obj.table_end() ;
	end ;
run ;

ods pdf close ;
ods listing ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Nov 2016 18:37:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-ODS-only-lines-up-data-on-the-first-row/m-p/308593#M17286</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2016-11-01T18:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: PDF ODS only lines up data on the first row</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-ODS-only-lines-up-data-on-the-first-row/m-p/308633#M17287</link>
      <description>&lt;P&gt;You should provide some example data for folks to test your code with and test suggestions beforehand. &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; has instructions on how to turn your dataset, or a portion, into data step code that can be pasted into the forum for us to recreate the data and attempt to duplicate the problem you have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It also often helps to provide an example of the output so we can actually see the result. "Doesn't line up" does not mean much without see what actually doesn't align.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2016 22:10:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-ODS-only-lines-up-data-on-the-first-row/m-p/308633#M17287</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-11-01T22:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: PDF ODS only lines up data on the first row</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-ODS-only-lines-up-data-on-the-first-row/m-p/308742#M17289</link>
      <description>&lt;P&gt;Hi ballardw,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apologize for not adding example data.&amp;nbsp; I should have created a temp version of my table that the code could run against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to correct this issue this morning.&amp;nbsp;&amp;nbsp; Since there are 3 cells in the data portion and only 1 cell in the heading row it was causes the column headings and data not to line up.&amp;nbsp; Once I added 2 blank cells it corrected the issue I was having.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if id=1 then do ;
		obj.row_start() ;
			obj.format_cell(text: "&amp;amp;heading.", overrides: "height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
obj.format_cell(text: '',  overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
obj.format_cell(text: '',  overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
		obj.row_end() ;
		obj.row_start() ;
			obj.format_cell(text: 'Varnum', overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
			obj.format_cell(text: 'Name',  overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
			obj.format_cell(text: 'Label', overrides: "indent=40 height=.06in backgroundcolor=white just=left font_face='Courier New' fontweight=bold") ;
		obj.row_end() ;		
	end ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Nov 2016 13:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-ODS-only-lines-up-data-on-the-first-row/m-p/308742#M17289</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2016-11-02T13:00:35Z</dc:date>
    </item>
  </channel>
</rss>

