- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi There,
I was trying to create a RTF file with below code. I'd like to put two titles on the same line. one with just=left, the other one with just=right.
However, it doesn't work in my program with bodytitle option was specified.
ODS RTF FILE= "X:\temp\myfile.rtf" style=styles.threelines keepn startpage=YES bodytitle;
title1 j=l "Company" j=r "Page x of N";
title2 "My title";
PROC REPORT DATA=rep NOWD HEADLINE HEADSKIP SPLIT='#' SPACING=1 MISSING
style(lines) = [ borderbottomcolor=white];
column txt ("_Total" ob cfb);
define txt / style(header)=[just=left asis=on]
style(column)=[just=left asis=on cellwidth=30% ] 'Visit';
define ob / style(header)=[just=center asis=on bordertopcolor=black bordertopwidth=0.5pt]
style(column)=[vjust=top just=center cellwidth=33% ]
"Observed" ;
define cfb / style(header)=[just=center asis=on bordertopcolor=black bordertopwidth=0.5pt]
style(column)=[vjust=top just=center cellwidth=33% ]
"CFB" ;
COMPUTE AFTER _PAGE_/ LEFT;
LINE @1 "Program: temp.sas Created on: &sysdate9.";
ENDCOMP;
run;
The report procedue works well, except for the title1, two titles aligns at right.
Anyone can help me on this? Thanks!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for providing your suggestion.
Finally, I got this resolved by ODS RTF with bodytitle_aux option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Subject updated: "Titles alignments in ODS RTF with bodytitle"
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Have a look at this SAS Note https://support.sas.com/kb/13/608.html and see if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Burno,
Thanks for your help.
Is there a corresponding option of KEEPN in ods.tagsets?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
As far as I know, this option does not exist for tagsets.rtf. You can display all the options available for tagsets.ods like so:
ods tagsets.rtf file= "c:\temp\myfile.rtf" options( doc="help");
ods tagsets.rtf close;
Also tagsets.ods does the "measurements" differently, so maybe KEEPN is not necessary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Or you coould try this workaround way.
ODS RTF FILE= "C:\temp\myfile.rtf" style=journal bodytitle; ods escapechar='~'; title1 "Company %sysfunc(repeat(~_,100)) Page x of N"; title2 "My title"; PROC REPORT DATA=sashelp.class NOWD; run; ods rtf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for providing your suggestion.
Finally, I got this resolved by ODS RTF with bodytitle_aux option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content