BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am new to SAS9.2 and tagsets.rtf. I tried to produce rtf output that have repeated order variables, but ran into problems with mis-allignment.

The correct output should look like this:

Patient
ID Visit Time point
006-001 DAY 2 PHARM. 2 MIN PRE-DOSE
3 MIN POST-DOSE
30 MIN POST-DOSE

But in some pages(some are good,some are bad) the time point will move all the way to the left and the three cells for patient ID/Visit/Timepoint are actually spanned(merged) into a single cell. and the result will look like this:

Patient
ID Visit Time point
2 MIN POST-DOSE
2 MIN PRE-DOSE
3 MIN POST-DOSE

I am wondering what is causing this problem. Thanks a lot for your help.
8 REPLIES 8
Cynthia_sas
SAS Super FREQ
Hi:
I'm not sure what procedure you're using, but it must be PROC REPORT if you're also using SPANROWS.

This program (below) works for me using SASHELP.PRDSALE. This is quite lengthy output, but I do get consistent headers at the page breaks.

Perhaps Tech Support could help you further with this issue. They can look at your data and look at your code and help you figure it out.

cynthia
[pre]
options nodate nonumber center;
ods listing close;

ods tagsets.rtf file='use_new.rtf' uniform
options(doc="Help");

proc report data=sashelp.prdsale nowd spanrows;
title j=r 'Use spanrows and uniform';
column country division prodtype actual predict;
define country / group;
define division / group;
define prodtype / order;
define actual / sum 'Actual';
define predict / sum 'Predict';
break after country / summarize page;
run;

ods tagsets.rtf close;
[/pre]
deleted_user
Not applicable
Cynthia,
Again, thanks for your prompt reply.
I just modified a little(added a width for predict so it will wrap) of your code to reproduce my problem. Please see if it produces the same error on your end. Thanks a lot.


options nodate nonumber center;ods listing close;
ods tagsets.rtf file='use_new.rtf' uniform options(doc="Help");
proc report data=sashelp.prdsale nowd spanrows;
title j=r 'Use spanrows and uniform';
column country division prodtype actual predict;
define country / group;
define division / group;
define prodtype / order;
define actual / sum 'Actual';
define predict / sum 'Predict' style(column)=[cellwidth=0.3 in];
break after country / summarize page;
run;
ods tagsets.rtf close;
Cynthia_sas
SAS Super FREQ
Hi:
Yes, I see the odd behavior. One workaround, of course, is -- don't do that with cellwidth.

But seriously, I think this is an issue that needs to be continued with Tech Support

cynthia
deleted_user
Not applicable
Cynthia,
I just extended the question to tech support and we'll see what they say about it. Thanks a lot for your help.
deleted_user
Not applicable
I'm having the same issue both when I use the uniform option or don't use the uniform option and specify cellwidth. Have you found a resolution?
Cynthia_sas
SAS Super FREQ
Hi:
The documentation for TAGSETS.RTF lists some other options that may be useful to you:
http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a003152286.htm

Most notably, along with UNIFORM, the PAGEPANELS= option. According to the doc, if you used PAGEPANELS=NONE as an option, it
"specifies that paneling will be handled the way that it has always been handled by traditional ODS RTF. That is, all of the first panel is written, then all of the second panel, and so on, until all of the table information is written."


The doc on the UNIFORM options says that UNIFORM:
"ensures uniformity from page to page within a single table that requires multiple pages. When the UNIFORM option is in effect, ODS reads the entire table before it starts to print it and determines the column widths that are necessary to accommodate all of the data. ODS applies these column widths to all pages of a multiple page table."


It seems to me that you might try either UNIFORM or PAGEPANELS=NONE (or both) in various permutations WITHOUT a specific cellwidth to allow ODS to do it's calculations. I don't know how your cellwidth specification might throw off or interfere with the automatic calculations of width that UNIFORM is doing. But, if your old cellwidth used to work with "classic" ODS RTF, then setting PAGEPANELS to NONE will at least get to that behavior.

For what it's worth, I generally avoid the UNIFORM option, because of the overhead in reading the whole table (the WHOLE table) to determine and calculate the required cellwidths. I generally will try to reduce the font_size or cellpadding to make tables fit or squeeze out some more space -- changing CELLWIDTH is my last resort.

If you don't find any combination of UNIFORM and/or PAGEPANELS that works for you (either with or without CELLWIDTH), then you might want to open a track with Tech Support, too -- as they have the most expertise in this matter.

cynthia
AimeeL
Calcite | Level 5

Did tech support come up with a work-around for this issue?  I'm running into it myself with rtf.tagsets and have attempted all of the above suggestions with no luck.

Cynthia_sas
SAS Super FREQ

Hi:

  I'm an instructor for SAS, and teaching today. I don't know what the resolution of the OP's track with Tech Support was. When Tech Support resolved that track they would have put the answer into their tracking system. If the issue was an error or mis-coding in the user's program, then no Tech Support note would have been written. If the issue was a defect or bug for which there was a workaround, then Tech Support generally writes a Tech Support note with the known workaround.

  If you have searched support.sas.com for this issue and have not found anything relevant, and you believe you are having the same issue, then you need to open a track with Tech Support, which will cause them to search their database of older tracks for similar problems (and fixes). To open a track with Tech Support, look for the blue hyperlink at the very bottom of this page that says "submit a problem report."

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 8 replies
  • 1671 views
  • 0 likes
  • 3 in conversation