<?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: How do I constrain row height when defining column width in proc report? in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927218#M26574</link>
    <description>Sorry.  It looks like when I adapted my code to the cars dataset I didn't do it perfectly.  Just trying to find a dataset users can run that creates wide column heights.&lt;BR /&gt;&lt;BR /&gt;It's fine with me if the text is truncated in places.  I can refine the widths if needed.  If there's a way to make it wrap and expand dynamically without the egregious extra space then all the better.</description>
    <pubDate>Mon, 06 May 2024 19:30:16 GMT</pubDate>
    <dc:creator>Ryanb2</dc:creator>
    <dc:date>2024-05-06T19:30:16Z</dc:date>
    <item>
      <title>How do I constrain row height when defining column width in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927190#M26572</link>
      <description>&lt;P&gt;I need to define column width to standardize the look of the report.&amp;nbsp; However, when I set the column width it automatically expands the row height for each cell.&amp;nbsp; I tried setting the cellheight in various places in the code but I can't seem to constrain it.&amp;nbsp; How is this done?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example using the sashelp.cars dataset that gives me the same results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;ODS results off;&lt;/DIV&gt;
&lt;DIV&gt;ODS listing close;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;ODS TAGSETS.EXCELXP&lt;/DIV&gt;
&lt;DIV&gt;file="C:\test.xml"&lt;/DIV&gt;
&lt;DIV&gt;STYLE=Printer&lt;/DIV&gt;
&lt;DIV&gt;OPTIONS (&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Sheet_Name = "NEW"&lt;/DIV&gt;
&lt;DIV&gt;Orientation = 'landscape'&lt;/DIV&gt;
&lt;DIV&gt;FitToPage = 'no'&lt;/DIV&gt;
&lt;DIV&gt;Pages_FitWidth = '1'&lt;/DIV&gt;
&lt;DIV&gt;Pages_FitHeight = '100'&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;embedded_titles = 'yes'&lt;/DIV&gt;
&lt;DIV&gt;);&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;PROC REPORT DATA=sashelp.cars&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; style(header)=[fontfamily=helvetica fontsize=8pt textalign=l]&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; style(column)=[fontfamily=helvetica fontsize=8pt textalign=l TAGATTR='format:text'];&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;columns make model type origin msrp drivetrain horsepower mpg;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;DEFINE make / STYLE(column)={width=2cm};&lt;/DIV&gt;
&lt;DIV&gt;DEFINE model / STYLE(column)={width=2cm};&lt;/DIV&gt;
&lt;DIV&gt;DEFINE type / STYLE(column)={width=2cm};&lt;/DIV&gt;
&lt;DIV&gt;DEFINE origin / STYLE(column)={width=2cm};&lt;/DIV&gt;
&lt;DIV&gt;DEFINE msrp / STYLE(column)={width=15cm};&lt;/DIV&gt;
&lt;DIV&gt;DEFINE drivetrain / STYLE(column)={width=2cm};&lt;/DIV&gt;
&lt;DIV&gt;DEFINE horsepower / STYLE(column)={width=2.5cm};&lt;/DIV&gt;
&lt;DIV&gt;DEFINE mpg / STYLE(column)={width=2cm};&lt;/DIV&gt;
&lt;DIV&gt;RUN;&lt;/DIV&gt;
&lt;DIV&gt;ods tagsets.excelxp close;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 May 2024 16:59:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927190#M26572</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2024-05-06T16:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I constrain row height when defining column width in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927213#M26573</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/46197"&gt;@Ryanb2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I need to define column width to standardize the look of the report.&amp;nbsp; However, when I set the column width it automatically expands the row height for each cell.&amp;nbsp; I&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Are you talking about values such as Model that have long text such as "3.5 RL w/Navigation 4dr" that &lt;STRONG&gt;wrap&lt;/STRONG&gt; text to another line because it is too long to fit in space provided?&lt;/P&gt;
&lt;P&gt;If so, what do you want to happen? Cutoff the extra text? Not wrap the text?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: SASHELP.CARS has MPG_City and MPG_Highway but not "MPG" as variables.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 18:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927213#M26573</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-05-06T18:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I constrain row height when defining column width in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927218#M26574</link>
      <description>Sorry.  It looks like when I adapted my code to the cars dataset I didn't do it perfectly.  Just trying to find a dataset users can run that creates wide column heights.&lt;BR /&gt;&lt;BR /&gt;It's fine with me if the text is truncated in places.  I can refine the widths if needed.  If there's a way to make it wrap and expand dynamically without the egregious extra space then all the better.</description>
      <pubDate>Mon, 06 May 2024 19:30:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927218#M26574</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2024-05-06T19:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I constrain row height when defining column width in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927225#M26575</link>
      <description>&lt;P&gt;I'm afraid that you will have to more clearly describe, or provide a better data set, that demonstrates your specific concern.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your comment "egregious extra space" without a concrete example isn't clear enough to code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The ExcelXP (or other formats) generally will attempt to "dynamically fit" text into provide width columns by wrapping text too long to fit in a defined report column width. XML files may have an issue with which specific file viewer you use though. If you haven't looked at the generated XML in a text viewer you should to see just how much default stuff is set that the viewer gets to interpret.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any particular reason you are using ODS ExcelXP for output?&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 20:22:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927225#M26575</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-05-06T20:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I constrain row height when defining column width in proc report?</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927260#M26576</link>
      <description>&lt;P&gt;You could use option "Row_Heights=".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS TAGSETS.EXCELXP
file="C:\temp\test.xls"
STYLE=Printer
OPTIONS ( 
Sheet_Name = "NEW"
Orientation = 'landscape'
FitToPage = 'no'
Pages_FitWidth = '1'
Pages_FitHeight = '100' 
embedded_titles = 'yes'

Row_Heights='0,40,0,0,0,0,0'

)   ;   
PROC REPORT DATA=sashelp.cars nowd
style(header)=[fontfamily=helvetica fontsize=8pt textalign=l] 
style(column)=[fontfamily=helvetica fontsize=8pt textalign=l TAGATTR='format:text']; 
columns make model type origin msrp drivetrain horsepower mpg;
 
DEFINE mpg / STYLE(column)={cellwidth=10cm};

RUN;
ods tagsets.excelxp close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1715047613945.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96208iE86D7A757587C436/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1715047613945.png" alt="Ksharp_0-1715047613945.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 02:07:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-do-I-constrain-row-height-when-defining-column-width-in-proc/m-p/927260#M26576</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-05-07T02:07:26Z</dc:date>
    </item>
  </channel>
</rss>

