BookmarkSubscribeRSS Feed
CarlosSantos
Calcite | Level 5

Hello,

I've migrated a job from SAS9.1.3 to SAS 9.3, and without any code changes the output has changed.

This job creates a html report and sends it by  email, but in SAS 9.3 the report has a box/frame around it as you can see in the pic CTQ - SAS 9.3

But I need to get the output equal to the "old" version:CTQ - SAS 9.1

Any help is welcome, thank you.

Code:

ods listing close;

/*set ods and mail settings options*/
ods path sasuser templat(update) sashelp.tmplmst(read);
Options emailsys="!SASROOT/utilities/bin/sasm.elm.mime" ;
filename ctqmail email to="&umail"
  type="text/html"
  subject="[CONTROLO DE QUALIDADE] Processamento de &odate para &LNAPP";

/*output result of the proc tabulate to the mail filename*/
ods MSOffice2K body=ctqmail style=meadow;
proc tabulate data=TEMPORARIA2 FORMAT=COMMAX20.0;
   class GRUPO CONTROLO VALIDACAO CDTIPOVALIDACAO DATA_ANALISE DATA_ANT GRP_DATA CDGRPENT / style=[color=#0033AA];
   classlev GRUPO CONTROLO VALIDACAO CDTIPOVALIDACAO DATA_ANALISE DATA_ANT GRP_DATA CDGRPENT / style=[color=#0033AA];
   VAR VALMETRICA VALMETRIC_ANT DIF_MES / style=[color=#0033AA];
   table  (GRUPO *
      (CONTROLO * VALIDACAO * CDTIPOVALIDACAO * CDGRPENT all='Sub-Total'*{S=[background=#EAEDF1 font_weight=bold font_style=italic]})
     all='Total'*{S=[background=#EAEDF1 font_weight=bold font_style=italic]}),
     GRP_DATA='Data(s) Analisada(s)' * (DATA_ANT=''*(VALMETRIC_ANT*SUM='') DATA_ANALISE=''*(VALMETRICA*Sum='') DIF_MES*SUM=''*{S=[preimage=watchit. font_weight=bold font_style=italic]});
    
   %setTitle(odate=&odate);
      FOOTNOTE3 height=10pt "Entidade(s) executada(s): &concatident_new";
run;

ods MSOffice2K close;
ods listing;
filename ctqmail;


CTQ - SAS 9.1.pngCTQ - SAS 9.3.png
4 REPLIES 4
Reeza
Super User

That's very much a tech support question, because they'll have the different versions to test things easily.

Cynthia_sas
SAS Super FREQ

HI:

  Are you complaining about the way the output looks in an IE browser when opened or when opened in Excel? Aside from any issues of emailing HTML and/or using the FILENAME statement, it is quite easy to either have the frame or not, depending on what you want to see. Clearly, you know how to use the STYLE= statement level override with PROC TABULATE, so a simple FRAME=VOID should get rid of the FRAME around the output for you. When I run the code test below, the FRAME is removed in all destinations. I suppose you could change the style template for the MEADOW style, but it is hardly worth it since the code fix is so easy.

  I don't know whether MEADOW changed between 9.1.3 and 9.3 in terms of border style. I do know that the display of borders was always somewhat wonky with Excel, so in addition to issues with MEADOW and the possibility of changes in the style template (an issue for Tech Support), there is the possibility of issues with how Excel rendered/renders the HTML. In my test of similar code below in 9.3 with either IE or Excel, I got borders in both viewers with FRAME=BOX and did not get borders with FRAME=VOID.

cynthia

ods listing close;

ods MSOffice2K(1) body='c:\temp\testfrm_box.xls' style=meadow;
ods MSOffice2K(2) body='c:\temp\testfrm_box.html' style=meadow;
title 'FRAME=BOX';
proc tabulate data=sashelp.class FORMAT=COMMAX20.0;
   where age le 13;
   class age sex / style=[color=#0033AA];
   classlev age sex / style=[color=#0033AA];
   VAR height weight / style=[color=#0033AA];
   table  (age * sex   all='Total'*{S=[background=#EAEDF1 font_weight=bold font_style=italic]}),
          ((height*SUM='') (weight*Sum='') )
     /s={frame=box} ;    
   FOOTNOTE3 height=10pt "Entidade(s) executada(s): xxxyyyzzz";
run;
ods _all_ close;

    

ods MSOffice2K(3) body='c:\temp\testfrm_framevoid.xls' style=meadow;
ods MSOffice2K(4) body='c:\temp\testfrm_framevoid.html' style=meadow;
title 'FRAME=VOID';
proc tabulate data=sashelp.class FORMAT=COMMAX20.0;
   where age le 13;
   class age sex / style=[color=#0033AA];
   classlev age sex / style=[color=#0033AA];
   VAR height weight / style=[color=#0033AA];
   table  (age * sex   all='Total'*{S=[background=#EAEDF1 font_weight=bold font_style=italic]}),
          ((height*SUM='') (weight*Sum='') )
    /style={frame=void};
   FOOTNOTE3 height=10pt "Entidade(s) executada(s): aaabbbccc";
run;

ods _all_ close;

CarlosSantos
Calcite | Level 5

Hello,

Thank you for your help.

I forgot some details, the frame I'm trying to remove is the black outer frame that you can see in pic CTQ - SAS 9.3 and not the frame of the table itself.

This behavior occurs in Microsoft Outlook, the report is sent by email and not used in Excel.

Thank you,

Carlos

Cynthia_sas
SAS Super FREQ

Hi:

  I would recommend working this with Tech Support. It doesn't surprise me that the the HTML (generated to conform to the Microsoft specification) might be rendered one way in IE and Excel and a different way in the Outlook client.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2058 views
  • 0 likes
  • 3 in conversation