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.)

tags: SAS Add-In for Microsoft Office, SAS Enterprise Guide, sas report, SAS Web Report Studio

3 Comments

  1. Posted February 22, 2012 at 10:32 pm | Permalink

    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
    Posted February 23, 2012 at 2:39 am | Permalink

    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
      Posted February 23, 2012 at 8:09 am | Permalink

      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.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <p> <pre lang="" line="" escaped=""> <q cite=""> <strike> <strong>