<?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 SAS Tip: Using the FLYOVER style attribute to display long text strings in SAS Tips from the Community</title>
    <link>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Using-the-FLYOVER-style-attribute-to-display-long-text/m-p/442594#M129</link>
    <description>&lt;P&gt;Does your nice-looking report occasionally have very long character values that dominate the screen real estate? If so, the &lt;EM&gt;&lt;STRONG&gt;flyover&lt;/STRONG&gt; &lt;/EM&gt;style attribute may be just what you need. In the example below, &lt;EM&gt;&lt;STRONG&gt;PROC REPORT&lt;/STRONG&gt;&lt;/EM&gt; is used to generate a report. A compute block is used to check the length of the long character variable and if it is longer than some pre-determined length (e.g., 20 characters), only the first 20 characters are displayed and the rest of the string is displayed using the flyover attribute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing close;
ods html file='\temp.html';
ods pdf file='\temp.pdf' notoc;
options noquotelenmax;
proc report data=sashelp.vslib nowd;
 columns libname path;
 compute path;
   if length(path) &amp;gt; 20 then
   do;  /* only show first 20 chars, use flyover for remainder */
      flyoverText = '...'||substr(path,21);
      path = substr(path,1,20)||'...';
      call define(_col_,'style','style=[flyover="'||strip(flyoverText)||'"]');
   end; /* only show first 20 chars, use flyover for remainder */
 endcomp;
run;
ods _all_ close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A few additional points about this example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The use of the &lt;A href="https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Using-the-NOQUOTELENMAX-Option/m-p/442595/highlight/true#M120" target="_blank"&gt;SAS Tip:Using the NOQUOTELENMAX Option&lt;/A&gt; option to suppress the erroneous mismatched quotes warning message.&lt;/LI&gt;
&lt;LI&gt;The flyover attribute works in both the HTML and PDF destinations.&lt;/LI&gt;
&lt;LI&gt;Generating both HTML and PDF output at the same time.&lt;/LI&gt;
&lt;LI&gt;Use of &lt;EM&gt;&lt;STRONG&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/EM&gt; to close both destinations.&lt;/LI&gt;
&lt;LI&gt;The maximum length could be specified using a macro variable.&lt;/LI&gt;
&lt;LI&gt;The maximum length that can be displayed in the HTML destination is dependent on the browser. If the generated flyover text is too long, your browser may truncate the value.&lt;/LI&gt;
&lt;/UL&gt;
&lt;HR /&gt;
&lt;P&gt;Thanks to Don Henderson&amp;nbsp;for sharing this tip on sasCommunity.org.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Mar 2018 15:39:15 GMT</pubDate>
    <dc:creator>SAS_Tipster</dc:creator>
    <dc:date>2018-03-21T15:39:15Z</dc:date>
    <item>
      <title>SAS Tip: Using the FLYOVER style attribute to display long text strings</title>
      <link>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Using-the-FLYOVER-style-attribute-to-display-long-text/m-p/442594#M129</link>
      <description>&lt;P&gt;Does your nice-looking report occasionally have very long character values that dominate the screen real estate? If so, the &lt;EM&gt;&lt;STRONG&gt;flyover&lt;/STRONG&gt; &lt;/EM&gt;style attribute may be just what you need. In the example below, &lt;EM&gt;&lt;STRONG&gt;PROC REPORT&lt;/STRONG&gt;&lt;/EM&gt; is used to generate a report. A compute block is used to check the length of the long character variable and if it is longer than some pre-determined length (e.g., 20 characters), only the first 20 characters are displayed and the rest of the string is displayed using the flyover attribute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing close;
ods html file='\temp.html';
ods pdf file='\temp.pdf' notoc;
options noquotelenmax;
proc report data=sashelp.vslib nowd;
 columns libname path;
 compute path;
   if length(path) &amp;gt; 20 then
   do;  /* only show first 20 chars, use flyover for remainder */
      flyoverText = '...'||substr(path,21);
      path = substr(path,1,20)||'...';
      call define(_col_,'style','style=[flyover="'||strip(flyoverText)||'"]');
   end; /* only show first 20 chars, use flyover for remainder */
 endcomp;
run;
ods _all_ close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A few additional points about this example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The use of the &lt;A href="https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Using-the-NOQUOTELENMAX-Option/m-p/442595/highlight/true#M120" target="_blank"&gt;SAS Tip:Using the NOQUOTELENMAX Option&lt;/A&gt; option to suppress the erroneous mismatched quotes warning message.&lt;/LI&gt;
&lt;LI&gt;The flyover attribute works in both the HTML and PDF destinations.&lt;/LI&gt;
&lt;LI&gt;Generating both HTML and PDF output at the same time.&lt;/LI&gt;
&lt;LI&gt;Use of &lt;EM&gt;&lt;STRONG&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/EM&gt; to close both destinations.&lt;/LI&gt;
&lt;LI&gt;The maximum length could be specified using a macro variable.&lt;/LI&gt;
&lt;LI&gt;The maximum length that can be displayed in the HTML destination is dependent on the browser. If the generated flyover text is too long, your browser may truncate the value.&lt;/LI&gt;
&lt;/UL&gt;
&lt;HR /&gt;
&lt;P&gt;Thanks to Don Henderson&amp;nbsp;for sharing this tip on sasCommunity.org.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 15:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Using-the-FLYOVER-style-attribute-to-display-long-text/m-p/442594#M129</guid>
      <dc:creator>SAS_Tipster</dc:creator>
      <dc:date>2018-03-21T15:39:15Z</dc:date>
    </item>
  </channel>
</rss>

