BookmarkSubscribeRSS Feed
eferencik
Fluorite | Level 6

 

I am having issues with the report's title row heights not being consistent.  Here is my ods statement.

 

ODS LISTING CLOSE;

ODS NORESULTS;

OPTIONS LeftMargin = .5in

RightMargin = .5in

TopMargin = .5in

BottomMargin = .5in

missing=' ';

ods tagsets.excelxp file="c:\CO Turnover Rate &title..xls"

style=minimal

OPTIONS (Orientation = 'landscape'

width_fudge='0.6'

absolute_COLUMN_WIDTH="12,10,10,10"

fittopage='yes'

Center_Horizontal='on'

EMBEDDED_TITLES='yes'

EMBEDDED_FOOTNOTES='yes'

autofit_height='on'

Pages_FitWidth='1'

Pages_FitHeight='100'

row_repeat='header');

 

ods tagsets.ExcelXP options(sheet_name="CO Turnover");

PROC REPORT DATA=FINAL NOWINDOWS MISSING

style(header)=[font_face=Times font_weight=bold background=ltgray]

style(column)=[font_face=Times];

COLUMNS DATE MON n EMPS TERMS PCT;

DEFINE DATE / ORDER=DATA NOPRINT;

DEFINE MON / DISPLAY 'Month';

DEFINE EMPS / ANALYSIS 'CO Count*' STYLE(COLUMN)=[TAGATTR="FORMAT:#,###"];

DEFINE TERMS / ANALYSIS 'Terminations' STYLE(COLUMN)=[TAGATTR="FORMAT:#,###"];

DEFINE PCT / ANALYSIS 'Turnover Rate' STYLE(COLUMN)=[TAGATTR="FORMAT:0.0#%"];

DEFINE N / NOPRINT;

COMPUTE AFTER;

DATE="&title";

EMPS.SUM=EMPS.SUM/N;

TERMS.SUM=TERMS.SUM;

PCT.SUM=TERMS.SUM/EMPS.SUM;

ENDCOMP;

rbreak after / dol skip summarize style(summary)=[background=ltgray font_weight=bold];

TITLE JUSTIFY=CENTER bold height=14pt font=times "Correctional Officer Turnover Rate";

title2 JUSTIFY=CENTER bold height=14pt font=times "&title";

title3 JUSTIFY=CENTER italic height=12pt font=times '(includes Job Class codes JD30, JD35, JD40 & JD50)';

 

RUN;

 

ODS TAGSETS.EXCELXP CLOSE;

ODS LISTING;

ODS RESULTS;

 

Here is the title and column header portion of my output.  I don't understand why rows 1 and 3 are taller than row 2.

 

Ods tagsets.excelxp Title.gif

3 REPLIES 3
Reeza
Super User

I think its part of the different title issue. What happens if you use ODS TEXT = statements instead?

 


@eferencik wrote:

 

I am having issues with the report's title row heights not being consistent.  Here is my ods statement.

 

ODS LISTING CLOSE;

ODS NORESULTS;

OPTIONS LeftMargin = .5in

RightMargin = .5in

TopMargin = .5in

BottomMargin = .5in

missing=' ';

ods tagsets.excelxp file="c:\CO Turnover Rate &title..xls"

style=minimal

OPTIONS (Orientation = 'landscape'

width_fudge='0.6'

absolute_COLUMN_WIDTH="12,10,10,10"

fittopage='yes'

Center_Horizontal='on'

EMBEDDED_TITLES='yes'

EMBEDDED_FOOTNOTES='yes'

autofit_height='on'

Pages_FitWidth='1'

Pages_FitHeight='100'

row_repeat='header');

 

ods tagsets.ExcelXP options(sheet_name="CO Turnover");

PROC REPORT DATA=FINAL NOWINDOWS MISSING

style(header)=[font_face=Times font_weight=bold background=ltgray]

style(column)=[font_face=Times];

COLUMNS DATE MON n EMPS TERMS PCT;

DEFINE DATE / ORDER=DATA NOPRINT;

DEFINE MON / DISPLAY 'Month';

DEFINE EMPS / ANALYSIS 'CO Count*' STYLE(COLUMN)=[TAGATTR="FORMAT:#,###"];

DEFINE TERMS / ANALYSIS 'Terminations' STYLE(COLUMN)=[TAGATTR="FORMAT:#,###"];

DEFINE PCT / ANALYSIS 'Turnover Rate' STYLE(COLUMN)=[TAGATTR="FORMAT:0.0#%"];

DEFINE N / NOPRINT;

COMPUTE AFTER;

DATE="&title";

EMPS.SUM=EMPS.SUM/N;

TERMS.SUM=TERMS.SUM;

PCT.SUM=TERMS.SUM/EMPS.SUM;

ENDCOMP;

rbreak after / dol skip summarize style(summary)=[background=ltgray font_weight=bold];

TITLE JUSTIFY=CENTER bold height=14pt font=times "Correctional Officer Turnover Rate";

title2 JUSTIFY=CENTER bold height=14pt font=times "&title";

title3 JUSTIFY=CENTER italic height=12pt font=times '(includes Job Class codes JD30, JD35, JD40 & JD50)';

 

RUN;

 

ODS TAGSETS.EXCELXP CLOSE;

ODS LISTING;

ODS RESULTS;

 

Here is the title and column header portion of my output.  I don't understand why rows 1 and 3 are taller than row 2.

 

Ods tagsets.excelxp Title.gif


 

eferencik
Fluorite | Level 6

How would I format that to have the formatting specified in my current title statements?

Reeza
Super User

It doesn't look like you can do inline styles, you have to do PROC TEMPLATE. PROC ODSTEXT has some options than an ODS TEXT statement will have, but a little more work as well. 

http://documentation.sas.com/?docsetId=odsproc&docsetVersion=9.4&docsetTarget=p14gx25pepks6dn1q9m7vk...


@eferencik wrote:

How would I format that to have the formatting specified in my current title statements?


 

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1423 views
  • 0 likes
  • 2 in conversation