The SAS Output Delivery System and reporting techniques

Missing gridlines

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

Missing gridlines

Hi,

 

I am trying to send a report as the body of an email message. If I output the data as PDF, the report retains its gridlines. However, in the body fo the email the data appears without gridlines.

 

I tried adding style(report)=[rules=all frame = hsides] in the PROC REPORT statement to no result.

 

I would appreciate any suggestions. Thank you.

DeaT

 

libname xxx "/path";

FILENAME outbox email
    to=("xxx@xxx.com")
    type='text/html'
    subject="xxx";

  ods listing close;
  ods html body=outbox ;

  options nodate pageno=1 linesize=189 ;


PROC REPORT data=xxx.contacts(obs=5) split='*' nowd;
   label customer_name = 'Cust*Name' customer_id = 'Cust*ID' fname='First*Name' lname='Last*Name'
   work_phone_ext='Work*Phone*Ext' email='E-mail' contact_type='Contact*Type' ;

     column  Customer_name customer_id  fname  lname
                          work_phone_ext  email   contact_type ;
     define action / display;
     define customer_id / display;
         define customer_name / display;
     define fname /  display;
     define lname /  display;
         define work_phone_ext / display;
         define email / display;
         define contact_type / display;

  Footnote;
  Title J=C "xxxs";
  Footnote1 'Total Updates =' "xxxt";
  run;

  ods html close;
  ods listing;


Accepted Solutions
Solution
‎04-12-2016 08:12 AM
SAS Super FREQ
Posts: 8,645

Re: Missing gridlines

Hi, if the gridlines show when the output is viewed in the browser, then the issue is with the way the mail applications is causing the ODS HTML to be rendered. Once SAS is done with creating the HTML, it is up to the browser or other application to render the HTML into what you see on the screen.

 

In some browsers, the interior table lines are considered to be part of the background of the "web page" shown in the browser -- so sometimes when you printed the HTML page, the gridlines seemed to disappear. That sounds like what your mail program might be doing. You could "fiddle" with other styles, but the mail program might treat them the same way.

 

In the end, you may just need to educate the people who get the output that they should view the output in the browsers. Or stop sending them HTML output and send them a PDF file as an attachment and then they should be able to view in Acrobat, and/or print if they want.

 

cynthia

View solution in original post


All Replies
Grand Advisor
Posts: 9,748

Re: Missing gridlines

What is the ODS style you use for HTML output?

Occasional Contributor
Posts: 9

Re: Missing gridlines

I'm using the default style--there isn't much else other than the code I posted.

After I posted my original message, I noticed something else. If you right-click in Outlook and choose VIEW IN BROWSER, the gridlines are there. I even changed the borders to red to make sure I wasn't missing something: the border doesn't show up in the email message at all (even black), but it is displayed as expected in the browser view. I'm not sure what to make of it.

Thank you.
Solution
‎04-12-2016 08:12 AM
SAS Super FREQ
Posts: 8,645

Re: Missing gridlines

Hi, if the gridlines show when the output is viewed in the browser, then the issue is with the way the mail applications is causing the ODS HTML to be rendered. Once SAS is done with creating the HTML, it is up to the browser or other application to render the HTML into what you see on the screen.

 

In some browsers, the interior table lines are considered to be part of the background of the "web page" shown in the browser -- so sometimes when you printed the HTML page, the gridlines seemed to disappear. That sounds like what your mail program might be doing. You could "fiddle" with other styles, but the mail program might treat them the same way.

 

In the end, you may just need to educate the people who get the output that they should view the output in the browsers. Or stop sending them HTML output and send them a PDF file as an attachment and then they should be able to view in Acrobat, and/or print if they want.

 

cynthia

Occasional Contributor
Posts: 9

Re: Missing gridlines

Thank you, Cynthia.
Post a Question
Discussion Stats
  • 4 replies
  • 381 views
  • 1 like
  • 3 in conversation