The SAS Output Delivery System and reporting techniques

Tableeditor 9.1 versus 9.2

Reply
Occasional Contributor
Posts: 14

Tableeditor 9.1 versus 9.2

When I put titles in a report I receive different results between SAS 9.1 and SAS 9.2.
There is only one .systemtitle and .systemfooter class in SAS9.1 that can be set by title_size

.systemtitle
{
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
font-weight: bold;
font-style: italic;
color: #003366;
}

SAS9.2
I have already change a test for 9.1 into 9.2.
The parm TITLE_SIZE is only active for title1 and the following title statements receives a very large size.
In SAS9.2 there are 10 systemtitle and systemfooter classes generated:

.systemtitle
{
font-family: Arial, Helvetica, sans-serif;
font-size: large;
font-weight: bold;
font-style: italic;
color: #003366;
}
.SystemTitle10
{
font-family: Arial, Helvetica, sans-serif;
font-size: large;
font-weight: bold;
font-style: italic;
color: #003366;
}
.SystemTitle2
{
font-family: Arial, Helvetica, sans-serif;
font-size: large;
font-weight: bold;
font-style: italic;
color: #003366;
}
.SystemTitle3
{
font-family: Arial, Helvetica, sans-serif;
font-size: large;
font-weight: bold;
font-style: italic;
color: #003366;
}
.SystemTitle4
{
font-family: Arial, Helvetica, sans-serif;
font-size: large;
font-weight: bold;
font-style: italic;
color: #003366;
}

……..

How can I solve this?
Super Contributor
Super Contributor
Posts: 3,174

Re: Tableeditor 9.1 versus 9.2

Share your SAS code that generates the pasted output.

Scott Barry
SBBWorks, Inc.
Occasional Contributor
Posts: 14

Re: Tableeditor 9.1 versus 9.2

Macro and SAS code:
/*---------------------------------------------------------------------
! ESRMGL46 : Macro to CREATE directly formatted EXCEL
! :
! Author : CST - Albert Jacobs (AJA) / Jos Van der Plancken (JVDP)
! Parm :
!---------------------------------------------------------------------
! Date !Vs! Opdracht / Contract ! Name
!--------!--!-------------------------------------------------!-------
! !00! Start development / in production ! AJA/JVDP
! !00! !
! !00! ( see ECAR 1283166 ) !
! !00! macro ESRMGL46: added this info Header, ! DDE
! ! ! ( =in accordance with STANDARD PROCEDUREs !
!28/04/09!00! Prepared for ValueSource ! DDE
'---------------------------------------------------------------------*/

%macro esrmgl46(size=10);
libname t1047 'esrpt000.dsns.t1047.templat.test' disp=shr;
ods path t1047.templat(read) sashelp.tmplmst(read);
ods tagsets.tableeditor file=_webout rs=none
style=t1047.mystyle
options(excel_zoom="90"
excel_scale="90"
excel_frozen_headers="yes"
sheet_name="Table"
excel_table_move="1"
file_format="ext"
nowrap="yes"
fontfamily="arial"
header_size="&size"
rowheader_size="&size"
data_size="&size"
title_size="15"
);
%put &sysver;
%mend;

%macro esrm5702;
/*---------------------------------------------------------------.
! esdm5702: Detail cijfers-Alle modellen !
! Auteur: CST - Jan Van Lint !
! Rapitweb : KPI4 Verhouding stock-repair per week !
! Alle modellen !
!----------------------------------------------------------------!
! Datum !Vs! Opdracht ! Naam !
!--------!--!-------------------------------------------!--------!
!04/07/07!00! begin ontwikkeling ! Jan !
.----------------------------------------------------------------*/
libname geg 'ESCPT000.DSNS.ASSET.WEEK.test' disp=shr;
data wkpi4; set geg.assets;
where status ='Operational' or (status='Repair'
and (stock='KBC MAG - HP' or stock =: 'KBC MAG - DROPPOINT'));
if stock =: 'KBC MAG - DROPPOINT' then do;
stock = 'KBC MAG - DROPPOINT'; end;
run;

proc sort data=wkpi4;
by model status;
run;

data kpi4 (keep=model statuscode rep oper perc);
set wkpi4;
by model status;
if first.model then do;
rep=0;
oper=0;
end;
If status= 'Repair' then rep+1;
else oper+1;
If last.model then do;
if oper = 0 then Perc=100;
else Perc=round((rep*100)/oper,.01);
output kpi4;
end;
run;

proc sort data=kpi4 ;
by model;
run;

/* Sorteren van de gebruikerstabel per model */

proc sort data=geg.models out=tabm (drop=kpi5 group5);
by model;
run;

/* Merge van de bestanden*/

data kpi4m;
merge kpi4 (in=in1) Tabm (in=in2);
by model;
if in1 and in2;
run;

proc sort data=kpi4m;
by kpi4 model;
run;
data _null_;
call symput('fjaar',compress(year(today())));
run;

data _NULL_;
date=date();
weekt=int(( date+(6-(mod(date,7))-7*((mod(date,7))<3))-
mdy(1,1,year(date+(6-(mod(date,7))-7*((mod(date,7))<3)))))/7);
call symput('weekt',compress(weekt));
run;

options nodate pageno=1 symbolgen mprint missing = '';
%esrmgl46;


title 'Assets in repair in proportion to operational assets';
title2 h=50 'All models';
title3 "For week &weekt of &fjaar";

proc report data=kpi4m box nowd ls=120;
column KPI4 model statuscode rep oper perc;
define kpi4 / order 'Type' width=10;
define model / order width=40;
define statuscode / order width=40;
define rep / display 'Repair' width=7;
define oper / display 'Operat.' width=8;
define Perc / display 'Perc' format=6.2;
compute perc;
if (oper < 100 and perc > 5) or(oper >100 and perc>2) then
call define (_col_,"style","style={background=red}");
endcomp;
run;
ods tagsets.tableeditor close;

%mend esrm5702;
SAS Super FREQ
Posts: 8,742

Re: Tableeditor 9.1 versus 9.2

Hi:
Tagsets.tableeditor is creating HTML -- and the inline CSS file is probably automatically created. Between 9.1 and 9.2, more style elements were added so the 10 titles and footnotes could be controlled separately from each other style-wise.

I don't know whether there are more title_size suboptions available for the tagset. Since I didn't see any title statements in your code, I'm not sure you need to worry about all 10 titles. However, one solution would be to create a modified style template -- that specifies a different font size.

If you don't want to alter the style template (one solution), then a different solution would be to try this at the statement level (whereever your TITLE statements are):
[pre]
title2 f=10pt 'Title 2 text';
title3 f=10pt 'Title 3 text';
etc, etc
[/pre]

The CSS section will still have the size set by the active style template, but the override at the TITLE statement level will be put in an in-line style section.

If you prefer not to use that method, then you'd have to alter the style template that's being used for your job or check to see whether the TABLEEDITOR tagset has an update that includes more suboptions for altering the other title sizes.

cynthia
Occasional Contributor
Posts: 14

Re: Tableeditor 9.1 versus 9.2

Hi Cynthia:

There are no more title_size suboptions available for the tagset tableeditor. But I think that your solution with the title statement is a good workaround.

The only little mistake is that f=10pt needs to be h=10pt.
Anyway thanks for the solution.

If you don't want to alter the style template (one solution), then a different solution would be to try this at the statement level (whereever your TITLE statements are):

title2 f=10pt 'Title 2 text'; title3 f=10pt 'Title 3 text'; etc, etc

Albert
SAS Super FREQ
Posts: 8,742

Re: Tableeditor 9.1 versus 9.2

Hi:
Yes, you're right, it should be H=. Thanks for posting that! Glad you got it working in spite of my incorrect code!
cynthia
Ask a Question
Discussion stats
  • 5 replies
  • 202 views
  • 0 likes
  • 3 in conversation