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
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.
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.