BookmarkSubscribeRSS Feed
mtrg92
Fluorite | Level 6

Hello,

 

I'm not familiar with the styles in sas. I have a program that sends a mail with an attached pdf and the content of the pdf inside the body of the mail.

 

Basically, in the body of the mail I have an alternance of PROC ODSTEXT and PROC REPORT statements. But with most styles the results is not so good. I tried default style, style=festival, style=minimalist, they all give very different results in terms of format (random space for no reasons before PROC REPORT, random borders circling the PROC REPORT output...). I would like to know if there is a good style to use when you have PROC REPORT AND PROC ODSTEXT in the body of your mail.

 

Thanks.

 

I don't show my code because it's not really relevant to the question, as I just want to know what kind of X I can put in styles=X ?

 

thank you very much

3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
You really have to experiment. If you want a black and white style, then I recommend STYLE=JOURNAL or STYLE=PEARL. The issue with not showing your code is that you said you are sending a mail "with an attached PDF and the content of the PDF inside the body of the mail" -- and that doesn't make sense to me. Attached files are attached files, they are NOT in the body of the mail. The body of the mail in Outlook can't be PDF - -I think it can be HTML, RTF or Plain Text for Outlook, so I don't understand what you're describing. If you think you're writing the equivalent of your PDF contents into the body of the mail, then I would expect differences depending on the email options you have that defines the content-type for the body of the mail. The thing is that Outlook may not respect the style you specify when it gets the mail, so seeing your code IS relevant -- I would recommend using STYLE=PEARL or STYLE=JOURNAL when you create the PDF file that's being attached. As for the body of the mail, since I'm not clear on what you're doing, I can't speak to that. You might want to work with Tech Support on this question.
Cynthia
mtrg92
Fluorite | Level 6
thank you for you answer. I will clarify, in the email body I have PROC REPORT and PROC ODSTEXT statement. Every time there is a PROC REPORT statement, there is a big blank and then a line and just after the table related to the PROC REPORT. I tried Pearl and Journalist but unfortunately the line and the big blank are staying.
Quentin
Super User

I suggest you make a small complete example (e.g. using sashelp,class) and post it, so that people can try it and play with it.

 

Are you using ODS HTML? HTML5? something else?  

 

Without an example, it's hard to know whether it's an issue with your code, the style template, or outlook's interpretation of the file.

 

If you're using ODS HTML or ODS RTF, you could start by getting it working correctly with the output file  (viewed in browser/word whatever). Then you can insert that output file into the email and see what outlook does to it.

 

But you may need to be flexible.  You could be in a situation where outlook interprets something differently than your browser.  Just like there are differences among browsers.

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1184 views
  • 1 like
  • 3 in conversation