BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
I have a data output file with several by groups and I want to generate tables and graphs for these different groups and then combine them side-by-side in the output (either reports in pdf or html). I know that this can be easily done in the document builder for a single instance of a graph and a table but I am generating more than 100 tables using the List procedure and also the some number of graphs for the same data using the Graph function.

The difficulty that I am having is combining them so that there is a table and a graph for the same group of data (by group) on each page of the report (whether pdf or html). Ideally, I would like to generate 100+ pages of output with a graph and corresponding table on each page. When I try to do this in the document builder it always puts either all of the tables first and then the graphs or the reverse. If anyone can help me solve this problem, I would greatly appreciate it. Thanks in advance.
2 REPLIES 2
RichardH_sas
SAS Employee
Hi Xander,

Maybe someone else has some EG ideas, but this really sounds like a problem most easily solve through programming, specifically Macro programming. You could take the code generated from your graph and list data tasks, turn it into a macro program, and use a %DO loop to go through the 100+ iterations.

In terms of pages, that's a little tricky. HTML doesn't do "pages" per se -- you could get horizontal separators, but not really pages. Or you could get 100+ separate HTML files, again, not really pages. PDF does do pages, but I'm not familiar enough with the ODS statements to control the page stuff. It's not supremely hard, just not my area of expertise.

Other thoughts?
Cynthia_sas
SAS Super FREQ
Hi:
The HTMLPANEL destination will do what you want to do (place a table and graph side by side) -- because it uses HTML tags to make a "panel" of table cells and then your tabular output is put into one cell and your graph into another cell.

The HTMLPANEL works because the ODS MARKUP destination has a special "tagset template" that acts differently than regular ODS HTML. To invoke the HTMLPANEL destination, you would use this invocation "sandwich":
[pre]
ods tagsets.htmlpanel . . . ;

< more sas code >
ods tagsets.htmlpanel close;
[/pre]

As described here:
http://support.sas.com/rnd/base/ods/odsmarkup/htmlpanel.html

The hitch for EG folks is that the HTMLPANEL tagset must be available on the server, in a library that is accessible. This may mean that
1) you have to get your SAS administrator to install the HTMLPANEL tagset template on the server;
2) you have to issue an ODS PATH statement in your code to point to the library location on the server -- as set by your SAS Administrator. This need is described in this Tech Support note:
http://support.sas.com/kb/32/394.html (the note is talking about the ExcelXP tagset template, but the general steps apply to ANY tagset template that you might need to use, including the HTMLPANEL tagset template.

This HTMLPANEL tagset template, of course, only works for HTML, not for PDF. If you want to investigate something for ODS PDF, you might investigate the experimental features of ODS LAYOUT. It works in a somewhat similar fashion to the way that the HTMLPANEL tagset works; however, it is experimental (in SAS 9.2) and the syntax may change before it becomes production. Here's some info on ODS LAYOUT:
http://support.sas.com/rnd/base/early-access/index.html
http://www2.sas.com/proceedings/sugi31/159-31.pdf
http://www2.sas.com/proceedings/sugi30/172-30.pdf
http://www2.sas.com/proceedings/forum2008/222-2008.pdf
http://support.sas.com/techsup/technote/ts659/ts659.html (section 3c and 3d)

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 621 views
  • 0 likes
  • 3 in conversation