@Cristina_inet wrote:
Hello everyone, we are generating some pdf reports, in them there are tables generated with proc report. We are asked if it is possible for the header columns to appear as follows:
The cells above should appear blank.
Right now we are displaying it as follows:
The code:
proc report data=VER
STYLE(header)=[ backgroundcolor=#8DB4E2 ]
style(header)={verticalalign=middle};
columns ('Tipo de vía' (TIPO_VIA_4F)) ("&anyo2."(muertos&anyo2.)) ("&anyo3."(muertos&anyo3.)) ('Diferencias'(FDIF_&anyo3._&anyo2. ));
define TIPO_VIA_4F / order order=data '' STYLE(header)=[backgroundcolor=white] STYLE(column)=[Color=darkblue] display left;
define muertos&anyo2. / order order=data 'Nº' display right;
define muertos&anyo3. / order order=data 'Nº' display right;
define FDIF_&anyo3._&anyo2. / order order=data "&anyo3.-&anyo2." display right;
compute muertos&anyo2; if TIPO_VIA_4F = 'TOTAL' then call define (_col_,"style","STYLE=[fontweight=bold]"); Endcomp;
compute TIPO_VIA_4F; if TIPO_VIA_4F = 'TOTAL' then call define (_col_,"style","STYLE=[fontweight=bold]"); Endcomp;
compute muertos&anyo3; if TIPO_VIA_4F = 'TOTAL' then call define (_col_,"style","STYLE=[fontweight=bold]"); Endcomp;
compute FDIF_&anyo3._&anyo2; if TIPO_VIA_4F = 'TOTAL' then call define (_col_,"style","STYLE=[fontweight=bold]"); Endcomp;
run;
Thank you very much for the help. Greetings.
*remove header text from column statement;
columns (TIPO_VIA_4F) ("&anyo2."(muertos&anyo2.)) ("&anyo3."(muertos&anyo3.)) ('Diferencias'(FDIF_&anyo3._&anyo2. ));
*Add the text here;
define TIPO_VIA_4F / order order=data 'Tipo de vía' STYLE(header)=[backgroundcolor=white] STYLE(column)=[Color=darkblue] display left;Th
This is untested.
... View more