Hi,
Not sure what my define statement is doing to cause a gap on the header and footer in pdf output (RTF looks good).
code:
ods pdf file = " &pgmname..pdf" startpage=no style= TLF_CN_9;
option formchar="|----|+|---+=|-/\<>*" ls=70 ps=70 missing = " " nobyline nocenter nodate nonumber orientation=landscape;
proc report data=final nowindows center headline headskip missing split='|';
column ord1 ord2 desc &alltrt all;
define ord1 / order order=internal noprint;
define ord2 / order order=internal noprint;
define desc / display " " style(header)=[just=left] style(column)=[asis=on cellwidth=2.5 in ] ;
run;
if i use "left" my indentations are gone.
Without your style and your data there really isn't any way to check what may be happening.
I would start by reviewing the definition of your TLF_CN_9 style.
Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the </> icon or attached as text to show exactly what you have and that we can test code against.
ods rtf file="c:\temp\x.rtf" style=journal;
proc report data=sashelp.class nowd;
column name age dummy weight height;
define dummy/computed ' ' style(header column)={ bordertopcolor=white bordertopwidth=2
borderbottomcolor=white borderbottomwidth=2 cellwidth=100};
compute dummy/character length=40;
dummy=' ';
endcomp;
run;
ods rtf close;
Hi:
As already indicated by others, without knowing your style and your macro variable values and having some test data, it is nearly impossible to make a constructive suggestion.
However, there are some things that you could fix that are just distractors and may or may not impact the output:
1) OPTIONS: You should NOT need the FORMCHAR option, that is a LISTING only option. Also, LS= and PS= are ignored by ODS PDF and actually inconsistent with your orientation=landscape. And, my understanding was that you should specify your OPTIONS before you open the ODS PDF destination, so I would absolutely change your OPTIONS statement so it was before the ODS PDF statement.
2) PROC REPORT statement: HEADLINE and HEADSKIP are LISTING only options and ignored by ODS destinations like PDF. So I would recommend that you get rid of these options, they are doing nothing.
3) DEFINE for DESC column: there are other ways to make a line indent other than using ASIS=ON. ODS PDF supports the LEFTMARGIN= option as shown below:
Hope this helps.
Cynthia
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.
Ready to level-up your skills? Choose your own adventure.