The SAS Output Delivery System and reporting techniques

ODS TEXT and VJUST options in SAS 9.4

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

ODS TEXT and VJUST options in SAS 9.4

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 ;

 

 


Accepted Solutions
Solution
‎08-14-2016 11:02 AM
SAS Super FREQ
Posts: 8,645

Re: ODS TEXT and VJUST options in SAS 9.4

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:

add_cellheight.png

 

  To get these results, I just added cellheight=1in inside the style specification for each ODS TEXT statement.

 

cynthia

View solution in original post


All Replies
Solution
‎08-14-2016 11:02 AM
SAS Super FREQ
Posts: 8,645

Re: ODS TEXT and VJUST options in SAS 9.4

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:

add_cellheight.png

 

  To get these results, I just added cellheight=1in inside the style specification for each ODS TEXT statement.

 

cynthia

Post a Question
Discussion Stats
  • 1 reply
  • 284 views
  • 0 likes
  • 2 in conversation