<?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: Compute block indent / left margin only working for the first line in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Compute-block-indent-left-margin-only-working-for-the-first-line/m-p/795766#M25612</link>
    <description>&lt;P&gt;Really need to show the entire procedure code and possibly even the ODS destination and style options in effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And probably should include some example data. Instructions here: &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; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Feb 2022 19:28:43 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2022-02-11T19:28:43Z</dc:date>
    <item>
      <title>Compute block indent / left margin only working for the first line</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Compute-block-indent-left-margin-only-working-for-the-first-line/m-p/795753#M25611</link>
      <description>&lt;P&gt;In the proc report I'm creating, I'm needing the left margin or indent to dynamically change with the value of a variable (which I have named "indent").&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have had this work before, with the exact same code, so I'm at a loss as to why it is suddenly not working correctly now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, it is working for only some of my lines and just.... not working on the rest.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;	compute textcol;
		if indent = 1 then do;
			call define(_col_, 'style', 'style={leftmargin=.22in}');
		end;
		if indent = 2 then do;
			call define(_col_, 'style', 'style={leftmargin=.38in}');
		end;
	endcomp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Data:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dstephenson_0-1644605371802.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68403i57DFEA624F979EF7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dstephenson_0-1644605371802.png" alt="dstephenson_0-1644605371802.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current Output:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dstephenson_1-1644605409813.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68404i2D8D85AC6941B367/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dstephenson_1-1644605409813.png" alt="dstephenson_1-1644605409813.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas what could be causing this? A setting in the rtf template maybe??&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 18:52:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Compute-block-indent-left-margin-only-working-for-the-first-line/m-p/795753#M25611</guid>
      <dc:creator>dstephenson</dc:creator>
      <dc:date>2022-02-11T18:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Compute block indent / left margin only working for the first line</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Compute-block-indent-left-margin-only-working-for-the-first-line/m-p/795766#M25612</link>
      <description>&lt;P&gt;Really need to show the entire procedure code and possibly even the ODS destination and style options in effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And probably should include some example data. Instructions here: &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; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 19:28:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Compute-block-indent-left-margin-only-working-for-the-first-line/m-p/795766#M25612</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-02-11T19:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Compute block indent / left margin only working for the first line</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Compute-block-indent-left-margin-only-working-for-the-first-line/m-p/795774#M25613</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;I agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; -- the order of the variables in the column statement can impact what you're doing. Also the usage type of the INDENT variable can have an impact. Showing your data is useful, but showing the code is better. I don't quite understand how you're getting Courier New looking fonts out of PROC REPORT since the default font for most destinations is a fixed pitch font. So that's another question about what might be in your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; In doing a quick test with some fake data, I see that LEFTMARGIN works for me in RTF and PDF output reports. I would not expect this to work in HTML or LISTING destinations. Here's an example in the PDF output file:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1644616647432.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68405i2C1603C92CB6888D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1644616647432.png" alt="Cynthia_sas_0-1644616647432.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The RTF file looks the same. I made helper variables called row_ord and linenum in addition to indent and text variables. The code I used is shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1644616717627.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68406iDB03950C4BCF65AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1644616717627.png" alt="Cynthia_sas_1-1644616717627.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note that in my code the INDENT variable is given a DISPLAY usage. If it was a numeric variable with the default analysis usage I would have needed to change the code in the COMPUTE block.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 21:59:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Compute-block-indent-left-margin-only-working-for-the-first-line/m-p/795774#M25613</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-02-11T21:59:27Z</dc:date>
    </item>
  </channel>
</rss>

