BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
mtrg92
Fluorite | Level 6

Hello,

 

I have to send a mail. In this mail,

  • I have to send an attachment in the form of a PDF (it works, I used PROC REPORT and ODS PDF to create it in the same program).
  • In the second part, I need to have the exact same content (PDF) with the same format in the email. I'm trying to insert it after the filename statement.I tried it by writing ODS HTML statement and then putting the macro that generates the PDF. Unfortunately, the formatting is different from the one in the attached PDF. I guess the HTML formatting mixed up with PDF doesn't really work.

I would be interested in knowing what kind of options/statements I can use to have the same result/formatting for the attachment part and the body mail part.

 

Thank you very much

 

1 ACCEPTED SOLUTION

Accepted Solutions
mtrg92
Fluorite | Level 6
Hello, forgot to answer but finally the problem was that I should use proc odstext instead of "PUT" statements. Thanks

View solution in original post

4 REPLIES 4
Quentin
Super User

One approach would be to use both  ODS HTML and ODS PDF when you write the report.  So you write and HTML files and a PDF file. Then you can attach the PDF, and you could use the HTML file as the body of the email. Or insert the HTML into the body of the email.

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.
mtrg92
Fluorite | Level 6

Thank you for your answer and your time. I tried to put ODS HTML but did not succeed in having a good output. So I will show it (in my first post my question was regarding formatting and the problem below is what I'm referring to - problem with borders).

My code that creates the PDF file consists only of ODS TEXT statements and PROC REPORT (multiple). Nothing else, I checked.

 

My current output looks like the attached file (an example).

 

As you can see there are borders around the text (ODS TEXT statements) but none for the tables (PROC REPORT part).

 

Ideally, I would like these borders to disappear for the ODS TEXT part and get some borders for the PROC REPORT part.

 

Thank you very much for your help. 

 

Quentin
Super User

Hi, 

 

If your question is about to how to add/remove borders, I suggest posting that as a new question.  When you post, please include full example code.  With an ODS PDF statement, ODS TEXT statement, and PROC REPORT.  You could use SASHELP.CLASS as a source, so that people can run your code.  That will make it easier for people to help you.  There are plenty of ODS experts here who should be able to help with that question.

 

-Q.

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.
mtrg92
Fluorite | Level 6
Hello, forgot to answer but finally the problem was that I should use proc odstext instead of "PUT" statements. Thanks

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 1243 views
  • 0 likes
  • 2 in conversation