<?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: Odsout obj(): color the rows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-color-the-rows/m-p/808851#M318937</link>
    <description>&lt;P&gt;Strong suggestion:&lt;/P&gt;
&lt;P&gt;Provide a small data set (if your report uses one) and a complete data step that we can execute that duplicates the behavior you show.&lt;/P&gt;
&lt;P&gt;Without data and complete code, or at least enough to generate some output it is extremely hard to determine what might be needed. It may be that white space is coming from something prior to the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case I would look at your WIDTH declarations. You have a table width of 18cm and cells of 15.5cm and 1.5cm, 15.5+1.5=17. So does the white space look to be about 1cm????&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you use explicit sizes it is up to you to ensure they make sense. I would likely use the CELL widths in percentages. That way if you change the table width the cells should adjust (though text may be cramped with other settings).&lt;/P&gt;</description>
    <pubDate>Wed, 20 Apr 2022 15:04:40 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-04-20T15:04:40Z</dc:date>
    <item>
      <title>Odsout obj(): color the rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-color-the-rows/m-p/808845#M318933</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know please how to avoid this white gap in&amp;nbsp;odsout obj():&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASdevAnneMarie_0-1650465671189.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70643iF2470D46EE6D2072/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASdevAnneMarie_0-1650465671189.png" alt="SASdevAnneMarie_0-1650465671189.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code is&amp;nbsp; :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  obj.table_start(name: "Table1_2",label: "Notre première table bis",overrides: "rules=none width=18cm frame=void");

			obj.row_start();        
            obj.format_cell(text: "WORDS WORDS WORDS WORDS WORDS :",  overrides: " backgroundcolor=cx338AFF  just=left color=white font_size=10pt font_weight=bold cellheight=0.55cm cellwidth=15.5cm fontfamily=arial");
			obj.format_cell(data: "NA", overrides: " backgroundcolor=cx338AFF  color=white font_size=10pt font_weight=bold just=left cellheight=0.4cm cellwidth=1.5cm fontfamily=arial");
            obj.row_end();

  obj.table_end();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you for your help !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 14:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-color-the-rows/m-p/808845#M318933</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-04-20T14:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Odsout obj(): color the rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-color-the-rows/m-p/808851#M318937</link>
      <description>&lt;P&gt;Strong suggestion:&lt;/P&gt;
&lt;P&gt;Provide a small data set (if your report uses one) and a complete data step that we can execute that duplicates the behavior you show.&lt;/P&gt;
&lt;P&gt;Without data and complete code, or at least enough to generate some output it is extremely hard to determine what might be needed. It may be that white space is coming from something prior to the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case I would look at your WIDTH declarations. You have a table width of 18cm and cells of 15.5cm and 1.5cm, 15.5+1.5=17. So does the white space look to be about 1cm????&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you use explicit sizes it is up to you to ensure they make sense. I would likely use the CELL widths in percentages. That way if you change the table width the cells should adjust (though text may be cramped with other settings).&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 15:04:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-color-the-rows/m-p/808851#M318937</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-20T15:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Odsout obj(): color the rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-color-the-rows/m-p/808861#M318942</link>
      <description>&lt;P&gt;Thank you Ballard,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't have a specail data for this code, the percentage doesn't work. I still have the gap.&lt;/P&gt;
&lt;P&gt;My code is :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options orientation=portrait;
OPTIONS TOPMARGIN=.001 in BOTTOMMARGIN=.001 in LEFTMARGIN=.001 in RIGHTMARGIN=.001 in;
ODS NORESULTS;
ODS PDF FILE = "&amp;amp;Publipostage.\TEST.pdf" dpi=1800 startpage=no;

data _NULL_;
	declare odsout obj();
	obj.layout_absolute(width:
		"8.26 in",height:"11.68 in" );
	obj.table_start(name: "Table1_2",label: "Notre première table bis",overrides: "rules=none width=18cm frame=void");
	obj.row_start();
	obj.format_cell(text: "WORDS WORDS WORDS WORDS WORD :",  overrides: " backgroundcolor=cx338AFF  just=left color=white font_size=10pt font_weight=bold cellheight=0.55cm cellwidth=80% fontfamily=arial");
	obj.format_cell(data: "NA", overrides: " backgroundcolor=cx338AFF  color=white font_size=10pt font_weight=bold just=left cellheight=0.55cm cellwidth=20% fontfamily=arial");
	obj.row_end();
	obj.table_end();
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Apr 2022 15:44:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-color-the-rows/m-p/808861#M318942</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-04-20T15:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Odsout obj(): color the rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-color-the-rows/m-p/808868#M318945</link>
      <description>&lt;P&gt;Sorry, I was remembering something else that allowed percents. It appears that cellwidth doesn't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But something else seems to be missing. I can't generate a PDF with that text on one row, which may be a version difference.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 16:33:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-color-the-rows/m-p/808868#M318945</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-04-20T16:33:50Z</dc:date>
    </item>
  </channel>
</rss>

