Hi xia, this is the complet code, the error is in the block compute "compute ef_gestion;": I test with a static number and run correctly, but with the variable.sum not run. compute ef_gestion; ef_gestion = cantidad_tr.sum / 17; endcomp; Code Complete: proc report data=rep_sup_pr1 nowd box headskip center missing style(header)=[foreground=white background=&ColorRep. bordercolor=black font_size=&RptFontZ2.] style(column)=[bordercolor=black just=c rules=group font_size=&RptFontZ2.]; title; title3; title4; footnote; columns ("Reporte" NEWSEG_DESC_OFICINA NEWSEG_DESC_OFICIAL CANTIDAD CANTIDAD_TR CANTIDAD_PR OFERTA_PR_SUM OFERTA_TR_SUM DESEMBOLSO_PR_SUM ef_contacto ef_colocado ef_trabajado ef_gestion ); define NEWSEG_DESC_OFICINA /group 'Oficina' width=25 style(column)=[ just=l cellpadding=0pt]; define NEWSEG_DESC_OFICIAL /group 'Oficial' width=25 style(column)=[ just=l cellpadding=0pt]; define cantidad /display sum 'Cantidad Ofertar' format=comma10.0 ; define cantidad_tr /display sum 'Cantidad Trabajada' format=comma10.0 ; define cantidad_pr /display sum 'Cantidad Colocada' format=comma10.0 ; define oferta_pr_sum /display sum 'Monto Oferta' format=dollar20.0; define oferta_tr_sum /display sum 'Monto Oferta Trabajada' format=dollar20.0; define desembolso_pr_sum /display sum 'Monto Desembolsado' format=dollar20.0; define ef_contacto /computed '% Efectividad Contacto' format=percent10.1 ; define ef_trabajado /computed '% Efectividad Trabajado' format=percent10.1 ; define ef_gestion /computed '% Cumplimiento Gestión' format=percent10.1 ; define ef_colocado /computed '% Efectividad Colocado' format=percent10.1 ; define tot_gestion /analysis noprint; define tot_contacto /analysis noprint; define tot_colocado /analysis noprint; define tot_trabajado /analysys noprint; define tot_canal /analysis format =6. "Total Canal"; compute before NEWSEG_DESC_OFICINA; tot_contacto = cantidad.sum; tot_colocado = cantidad_pr.sum; tot_trabajado = cantidad_tr.sum; tot_gestion = meta_pr.sum; endcomp; compute ef_contacto; ef_contacto = cantidad_tr.sum / cantidad.sum; endcomp; compute ef_trabajado; ef_trabajado = cantidad_pr.sum / cantidad_tr.sum; endcomp; compute ef_gestion; ef_gestion = cantidad_tr.sum / meta_pr.sum; endcomp; compute ef_colocado; ef_colocado = cantidad_pr.sum / cantidad.sum; endcomp; compute after NEWSEG_DESC_OFICINA; NEWSEG_DESC_OFICINA = 'Total'; call define (_row_,'style',"style=[foreground=white background=&ColorRep. bordercolor=black font_weight=bold]"); endcomp; compute after; NEWSEG_DESC_OFICINA = 'Total General'; call define (_row_,'style',"style=[foreground=white background=&ColorRep. bordercolor=black font_weight=bold]"); endcomp; break after NEWSEG_DESC_OFICINA/ summarize skip dul; rbreak after / dol summarize; run; DataSet: Log Error Message: NOTE: Multiple concurrent threads will be used to summarize data. ERROR: The variable type of 'META_PR.SUM'n is invalid in this context. NOTE: The preceding messages refer to the COMPUTE block for ef_gestion. ERROR: The variable type of 'META_PR.SUM'n is invalid in this context. NOTE: The preceding messages refer to the COMPUTE block for BREAK BEFORE NEWSEG_DESC_OFICINA.
... View more