BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is it possible to modify the an ODS style sheet in a way in order to add text before each table created by a procedure?

For example, add the text "XXXX" before each table created by a PROC REPORT output?

I have tried using the PRETEXT="XXXX" statement, however this also adds the text in to every cell the the tables along with before each table.

Any help would be very much appreciated.
7 REPLIES 7
Tim_SAS
Barite | Level 11
Can you say more about what you're looking for here? In what way is this text different from a plain title? Where part of the table do you want the text associated with? Do you want the text to appear only at the start of the entire report, or at the start of each by-group?
deleted_user
Not applicable
I have (embarrassingly) found a work-around using a number of ODS RTF SELECT statements, which seems to give me what I'm after.
deleted_user
Not applicable
> Can you say more about what you're looking for here?
> In what way is this text different from a plain
> title? Where part of the table do you want the text
> associated with? Do you want the text to appear only
> at the start of the entire report, or at the start of
> each by-group?

I have a similar problem. I was trying to use PRETEXT= because I'm using the BODYTITLE option (I need my titles & footnotes external to the header & footer in my RTF). I've tried multiple ways after reading different papers from SUGIs/Global Forums. I'm looking for help: what is the best method to put titles & footnotes on each page when BODYTITLE is in effect?
Cynthia_sas
SAS Super FREQ
Just in case your method doesn't work under some circumstance, you should also check out the TEXT= ODS option. It works like this:
[pre]
ods html file='somefile.html';


ods html text='before proc 1';

...sas code for proc 1 ...


ods html text='before proc 2';

... sas code for proc 2 ...
ods html close;
[/pre]
If you were creating PDF or RTF, then all the references to HTML in the above sample would change accordingly. Remember also that other statements like your title, footnote and by lines will also have an effect on the output. Still, ODS TEXT= is a handy tool for adding extra captions or explanatory text before or after your procedure output.
cynthia
deleted_user
Not applicable
I have a similar problem. I was trying to use PRETEXT= because I'm using the BODYTITLE option (I need my titles & footnotes external to the header & footer in my RTF). I've tried multiple ways after reading different papers from SUGIs/Global Forums. I'm looking for help: what is the best method to put titles & footnotes on each page when BODYTITLE is in effect?
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Suggestion: A more effective technique to post to the forum is to start a new thread (instead of piggy-backing on a 3 year old thread from someone else), and if you must then include a link to the prior thread for reference.

Scott Barry
SBBWorks, Inc.
Cynthia_sas
SAS Super FREQ
Hi:
I agree with Tim, that we need a bit more info. TITLEs can be left justified, or center justified, so they might do the trick.

You might also look at some COMPUTE BEFORE examples -inside- PROC REPORT....or some ODS TEXT= examples (which would go -outside- of PROC REPORT). I generally do not use PRETEXT=/PREHTML=, except occasionally to pass RTF control strings into RTF or HTML files created with ODS.

Also relevant is your destination of choice -- LISTING, HTML, RTF, etc.

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!

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