Hi Team,
I am using SAS 9.4 (TS1M1) in X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation.
I am trying to create a pdf report using ODS PDF and requires me to use VJUST option to align the text, apparently VJUST has no effect in my report as all aligning to TOP only. Below is the snippet of code for your evaluation and suggestion.
Sample output from below code is attached for reference.
Appreciate any workaround or suggestion.
Thanks
options Papersize = (11.5in 9in ) orientation=landscape leftmargin=.01in rightmargin=.01in topmargin=.01in bottommargin=.01in nocenter nonumber nodate;
TITLE1; TITLE2;
ODS ESCAPECHAR= '^';
ods html close;
ODS PDF file="C:\Users\sjayara9\Desktop\svq report\ODSTEXT_VJUST.PDF"
startpage=never
pdftoc=1
bookmarklist=show
;
ODS layout start x=0.5 in y=0.5 in HEIGHT = 8 in WIDTH = 10 in ;
/* Test for TOP Alignment*/
ODS region x=0 in y=0.3 in height = 1 in width = 1 in style={background=CX0070C0 bordercolor=black borderwidth=0.5 };
ods text = "^S={just=R VJUST=T color=white background=CX0070C0 fontfamily=Arial font_size=8pt} WWID: ";
/* Test for MIDDLE Alignment*/
ODS region x=0 in y=1.3 in height = 1 in width = 1 in style={background=CX0070C0 bordercolor=black borderwidth=0.5 };
ods text = "^S={just=C VJUST=M color=white background=CX0070C0 fontfamily=Arial font_size=8pt} WWID: ";
/* Test for BOTTOM Alignment*/
ODS region x=0 in y=2.3 in height = 1 in width = 1 in style={background=CX0070C0 bordercolor=black borderwidth=0.5 };
ods text = "^S={just=L VJUST=B color=white background=CX0070C0 fontfamily=Arial font_size=8pt} WWID: ";
ODS layout end;
run;
quit;
ODS PDF close;
*ods results;
options leftmargin=0in rightmargin=0in topmargin=0in bottommargin=0in;
ods html ;
Hi:
Your image/file did not open for me. However, there was already a posting about the issue of VJUST with ODS TEXT and ODS REGION in the Forums. Here it is: https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/284878/highlight/t...
When I ran a test, using the solution posted there, I do see the VJUST works:
To get these results, I just added cellheight=1in inside the style specification for each ODS TEXT statement.
cynthia
Hi:
Your image/file did not open for me. However, there was already a posting about the issue of VJUST with ODS TEXT and ODS REGION in the Forums. Here it is: https://communities.sas.com/t5/ODS-and-Base-Reporting/vjust-usage-in-a-region/m-p/284878/highlight/t...
When I ran a test, using the solution posted there, I do see the VJUST works:
To get these results, I just added cellheight=1in inside the style specification for each ODS TEXT statement.
cynthia
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.
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.