SAS Report: You're soaking in it


Do you want your report to look good on the web, or to look good when you print it? Pick one.

Before the SAS Report file format, that was the choice that you faced.

HTML is perfect for the web browser. It's easy to scroll through tables, to apply an attractive color scheme, and to interact with graphical output. But if you try to print it, it's a mess. Tables don't always fit on a page, page numbering is nonsensical, and your colors get lost.

If you want printed output, PDF is the way to go. Your output is optimized for the printed page. Tables, if they don't fit on a single page, have repeating column headers on subsequent pages. You can control whether it's landscape or portrait. But to view it on the web, you need a special browser plugin. If you try to share sections of content with copy/paste operations, you can end up with some funky results.

SAS Report combines the best of these two mainstay formats into a single destination. In my Chunky-soup-style slogan,  "SAS Report views like HTML and prints like PDF."

If you use SAS Enterprise Guide, SAS Web Report Studio, or SAS Add-In for Microsoft Office, then you already use SAS Report format. (You're soaking in it, metaphorically...though it might not result in softer hands.)

Here's a partial list of where SAS Report makes an appearance:

  • It's the default output format for results in SAS Enterprise Guide (version 4.2 and later).
  • It's the format for report definitions in SAS Web Report Studio, which are stored as SRX files (SAS Report XML).
  • It's how the SAS Add-In for Microsoft Office pulls SAS output into your Microsoft Office client (such as Excel), and keeps the substance of your result while allowing you to apply custom formatting using Office features.  How does that work?  The SAS Report format actually keeps the data (substance) separate from the appearance (layout and style), so it's easier for the Add-In to keep them straight.
  • It's an ODS destination (ODS tagsets.sasreport12) that can feed content to all of these client applications from any SAS program.

SAS Report is the lingua franca of SAS business intelligence applications.  You can share your SAS Enterprise Guide report with SAS Web Report Studio.  In the SAS Add-In for Office, you can open reports that were created in SAS Web Report Studio or SAS Enterprise Guide.

SAS Report output can also be pulled apart and combined to create entire new reports.  The Report Builder in SAS Enterprise Guide (File->New->Report) allows you to take output from different tasks and programs within your project, and combine these into a report definition that shows just the pieces you want to share.  You can even design the report with side-by-side layouts, add text and graphics, and control how the report fits on a page.

SAS Report may be a proprietary SAS file format, but that doesn't tie your content to SAS client applications. You can use SAS Enterprise Guide to save the report to PDF or HTML when you need to share with colleagues who are less fortunate (who don't have access to SAS).  And of course, you can "print" SAS Web Report Studio reports to PDF.

And here's another little trick: SAS Report doesn't just print nicely -- it also copies nicely. In SAS Enterprise Guide, you can right-click on a table or graph in the SAS Report viewer and select Copy, then Paste into a Microsoft Office document (such as a spreadsheet or Word doc). SAS Enterprise Guide puts well-formed HTML "on the clipboard", and that's readily accepted by Office applications. (Hat tip to Tricia for reminding me how cool this feature can be.)


About Author

Chris Hemedinger

Director, SAS User Engagement

+Chris Hemedinger is the Director of SAS User Engagement, which includes our SAS Communities and SAS User Groups. Since 1993, Chris has worked for SAS as an author, a software developer, an R&D manager and a consultant. Inexplicably, Chris is still coasting on the limited fame he earned as an author of SAS For Dummies


  1. Wow you covered more than I thought there was to know! I have to admit I'm hungry and want to wash dishes now. ;-)

    I agree with your last paragraph whole heartedly. It is so easy to paste a really pretty, easy to read report into an Excel spreadsheet. I use it a lot when preparing test results. Clients are always impressed. Now they know my secret!

  2. Anders Bergquist on

    SAS Report format is nice, but I need to use ods html if I need ods layout. SAS Report does not support it, and therefore I can not get nice formatted output.

    • Chris Hemedinger
      Chris Hemedinger on

      Anders, that's a good point. SAS Report does not yet support ODS LAYOUT. You can use clients like Enterprise Guide and SAS Web Report Studio to manipulate the layout, but you can't manage it in a SAS program. Also, the BASE ODS team would want me to remind you that, strictly speaking, ODS LAYOUT is labeled as an "experimental" feature. However, I've used it quite a bit and it's very solid for most scenarios.

  3. Allen Ziegenfus on

    It is nice to see that SAS is making an attempt to have some interoperability of reports with the different SAS clients, but calling the SAS Report format a "lingua franca" for reporting strikes me as just marketing talk. The SAS Report format has many limitations and cannot even support basic formatting features like embedding images in a table or indenting text.

    • Chris Hemedinger
      Chris Hemedinger on

      Allen, you're correct that the SAS Report format is limited in some of its formatting capabilities. Actually, when I wrote this post back in 2012, SAS Report was almost indistinguishable from HTML in features, and it was much more malleable and "transportable" across the various SAS client apps.

      SAS Report is still the default format for EG and for SAS Add-In for Microsoft Office. But we also have a new report format that is richer and compatible with SAS Visual Analytics (though there is not an ODS tagset for it yet, as far as I know). ODS has also added more target destinations such as ODS HTML5, ODS EPUB, ODS POWERPOINT, and (experimentally for now) ODS EXCEL. These new destinations provide a way for you to create content directly to another application's native format without going through a different client app, if you want.

  4. dear chris,
    please help me that i am using SAS 9.4, for pk analysis, for that we need the data in XPT format, first we have the WinNolin software but not we don't have in our organization, so we cant able to run the program, so we need to change our Excel or word document to XPT. if any program is available means we can able to go forward by us.

    • Chris Hemedinger
      Chris Hemedinger on

      If you have SAS 9.4, you can use the XPORT engine to create these files. See the doc here.

      Example syntax:
      libname source 'SAS-data-library'; libname xportout xport 'transport-file'; proc copy in=source out=xportout memtype=data; run;

  5. Chris,

    Thank you very much for this tip. I saved my proc report results in SAS Report format using ods tagsets.sasreport12 . However, I had previously exported my proc report resuts to .srx file in SAS EG reoslut window and inserted the sections of my report in Power Point slides. Now, when I use the same report that was saved using sasrepor12 tagset and refresh my slides, all the custom formatting I had done got lost !! Is there a way around for it? I appreciate your reply.


    • Chris Hemedinger
      Chris Hemedinger on

      Is this in the SAS Add-In for Microsoft Office? Might need to open a Tech Support ticket, or share more details in a question on SAS Support Communities. Also of note: SAS 9.4m3 now has a native PowerPoint destination (ODS POWERPOINT), so you could direct your SAS content directly to PPTX without using SAS Report.

Back to Top