Hi,
I am creating a report using tagsets.rtf and the bottom border line truncates for some pages:
The border displays correctly for other pages:
The length also differs depending on the data and output.
I am using the following code:
libname raw 'Downloads'; /* options */ options nofmterr validvarname=v7 nobyline nomlogic nomprint missing=' ' dtreset nodate nonumber formchar='|----|+|---+=|-/\<>*' ls=134 ps=46 papersize=Letter orientation=landscape noquotelenmax; goptions reset=goptions /*device=sasemf target=sasemf*/ xmax=9in ymax=4.7in; ods escapechar='^'; /* template for rtf output */ proc template; define style textstyle; parent=styles.rtf; style usertext from usertext; replace fonts / 'TitleFont' = ("CourierNew",8pt) /* TITLE statement */ 'docFont' = ("CourierNew",8pt) 'headingFont' = ("CourierNew",8pt) 'BatchFixedFont' = ("CourierNew",8pt) 'FixedStrongFont' = ("CourierNew",8pt) 'StrongFont' = ("CourierNew",8pt) 'FixedEmphasisFont' = ("CourierNew",8pt) 'EmphasisFont' = ("CourierNew",8pt) 'FixedFont' = ("CourierNew",8pt) 'Titlefont2' = ("CourierNew",8pt); class GraphFonts "Fonts used in graph styles" / 'GraphDataFont' = ("CourierNew",8pt) 'GraphValueFont' = ("CourierNew",8pt) 'GraphLabelFont' = ("CourierNew",8pt); replace Body from Document "Controls the Body file." / background=_UNDEF_ bottommargin = 2.54cm topmargin = 2.54cm rightmargin = 2.54cm leftmargin = 2.54cm; style table from table / background=_UNDEF_ rules=groups frame=above cellspacing=0 cellpadding=0 borderwidth=1pt; style header from header / font=fonts("docFont") background=_undef_ just=c; end; run; title1 j=l "Company" j=r " CONFIDENTIAL"; title2 "Details" j=r "Page ^{thispage} of ^{lastpage}"; title3 j=c "^R'\s1 'Output 1"; title4 j=c "^R'\s2 'Subjects"; footnote1 ' '; footnote2 j=l "Test.sas"; /* report */ ods tagsets.rtf file="Downloads\test.rtf" /*options(vspace='no')*/ style=textstyle options(continue_tag="no"); proc report data=raw.test headline missing nocenter nowindows split='|' style(header lines)=[protectspecialchars=off] style(report)=[frame=hsides]; column subjectid site subjectstatus ranyn ranarm lvmodcp age ("^n Population ^R'\brdrb\brdrs\brdrw15 '" ittfl mittfl); define subjectid/"^R'\ql' Subject ID^n" style(column)={cellwidth=0.5in just=l}; define site/'Site ^n' style(column)={cellwidth=2.86in just=l}; define subjectstatus/'Subject status ^n' style(column)={cellwidth=0.7in just=l}; define ranyn/'Subject randomized ^n' style(column)={cellwidth=0.7in just=c}; define ranarm/'Care arm ^n' style(column)={cellwidth=1.2in just=l}; define lvmodcp/'Last visit module completed ^n' style(column)={cellwidth=1.6in just=l}; define age/'Age (years) ^n' style(column)={cellwidth=0.5in just=c}; define ittfl/'ITT ^n' style(column)={cellwidth=0.4in just=c}; define mittfl/'MITT ^n' style(column)={cellwidth=0.4in just=c}; run; ods tagsets.rtf close; proc printto; run;
I have tried modifying the cellspacing, cellpadding, borderwidth etc.
The problem does not occur when I insert manual page breaks in the report, however this is not a viable option at the moment.
I am using SAS 9.4 (TS1M3)
Thanks in advance
Added output, sample data and code
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.