Hello-
I'm trying to put various counts into some text variables in the summary line. I've used this technique before but for some reason it won't display in this PDF. The counts show up on the _RBREAK_ row in the out= dataset (chkbreak). The formats also change properly on the PDF (from the call define statements) - but they just show 0 instead of the counts. I've gone back and forth creating them as temporary variables using compute before and then using those but the results are the same (show as 0). The text variables have a width of 8 and the counts get no higher than 3 digits. There are also no errors in the log. For what its worth, the count for current_ret.sum that is "put" into the bname variable does show up properly. Am I missing something here? (I left out the ODS "sandwich" portion of the code to keep it a little simpler) Any help would be appreciated. Thanks.
[pre]
data _NULL_; retain cnt 0; set Final_Orders_Validations; by regsort regname dsmname lsrname;
if first.regname then do; cnt+1;
call symput('REG'||trim(put(cnt, 2. -L)), trim(regname));
end; call symput('Rtot', trim(put(cnt, 3. -L))); run;
%do i=1 %to &Rtot;
data _NULL_; retain cnt 0; set Final_LSR_Orders_Validations; by regsort regname lsrname;
where regname="&®&i";
if first.lsrname then do; cnt+1;
call symput('LSR'||trim(put(cnt, 2. -L)), trim(lsrname));
end; call symput('Ltot', trim(put(cnt, 3. -L))); run;
%do j=1 %to &Ltot;
options pageno=1;
ods proclabel "&&LSR&j";
proc report data=Final_LSR_Orders_Validations nowd headline headskip list split='*' out=chkbreak
style(report)=[rules=ALL frame=BOX]
style(header)={font_face=Arial fontsize=8pt font_weight=bold background=CXFFFF99 foreground=CX003399}
style(column)={font_face=Arial fontsize=7pt cellheight=40 vjust=m}
style(summary)={font_face=Arial fontsize=8pt font_weight=bold just=c vjust=m cellheight=44} contents="";
column table_label_remove ('~{style [cellheight=44 vjust=m fontsize=10pt] }' regname lsrname)
('~{style [cellheight=44 vjust=m fontsize=10pt]Retailer Info}' RID Chain bname street city iss_facings Current_RET)
(' ' Order_Ret_&Game1 Order_Ret_&Game2 Order_Ret_&Game3 Val_Ret_&Game1 Val_Ret_&Game2 Val_Ret_&Game3)
("~{style [cellheight=44 vjust=m fontsize=10pt]&Game1 - &Gname1}" FirstOrd_txt_&Game1 FirstVal_txt_&Game1 LastVal_txt_&Game1)
("~{style [cellheight=44 vjust=m fontsize=10pt]&Game2 - &Gname2}" FirstOrd_txt_&Game2 FirstVal_txt_&Game2 LastVal_txt_&Game2)
("~{style [cellheight=44 vjust=m fontsize=10pt]&Game3 - &Gname3}" FirstOrd_txt_&Game3 FirstVal_txt_&Game3 LastVal_txt_&Game3);
define table_label_remove / group noprint;
define regname / group "Region" width=20 f=$20. noprint;
define lsrname / group "LSR" width=22 f=$22. noprint;
define RID / order "RID" width=6 f=$6. center;
define chain / "Chain" width=6 f=$6. center;
define bname / "Store Name" width=24 f=$24. ;
define street / "Address" width=18 f=$18. ;
define city / "City" width=15 f=$15. ;
compute city; if _BREAK_="_RBREAK_" then call define(_COL_, "style", "style={just=r}"); endcomp;
define iss_facings / "ISS Facings" width=6 f=6. display center;
define Current_Ret / "Current*Retailers" width=9 f=comma9. noprint;
define Order_Ret_&Game1 / width=8 f=8. sum noprint;
define Order_Ret_&Game2 / width=8 f=8. sum noprint;
define Order_Ret_&Game3 / width=8 f=8. sum noprint;
define Val_Ret_&Game1 / width=8 f=8. sum noprint;
define Val_Ret_&Game2 / width=8 f=8. sum noprint;
define Val_Ret_&Game3 / width=8 f=8. sum noprint;
define FirstOrd_txt_&Game1 / "First*Order" width=8 f=$8. center ;
compute FirstOrd_txt_&Game1; if _BREAK_="_RBREAK_" then call define(_COL_, "format", "comma6."); endcomp;
define FirstVal_txt_&Game1 / "First*Validation" width=8 f=$8. center ;
compute FirstVal_txt_&Game1; if _BREAK_="_RBREAK_" then call define(_COL_, "format", "comma6."); endcomp;
define LastVal_txt_&Game1 / "Last*Validation" width=8 f=$8. center ;
compute LastVal_txt_&Game1; if _BREAK_="_RBREAK_" then call define(_COL_, "format", "percent6."); endcomp;
define FirstOrd_txt_&Game2 / "First*Order" width=8 f=$8. center;
compute FirstOrd_txt_&Game2; if _BREAK_="_RBREAK_" then call define(_COL_, "format", "comma6."); endcomp;
define FirstVal_txt_&Game2 / "First*Validation" width=8 f=$8. center;
compute FirstVal_txt_&Game2; if _BREAK_="_RBREAK_" then call define(_COL_, "format", "comma6."); endcomp;
define LastVal_txt_&Game2 / "Last*Validation" width=8 f=$8. center;
compute LastVal_txt_&Game2; if _BREAK_="_RBREAK_" then call define(_COL_, "format", "percent6."); endcomp;
define FirstOrd_txt_&Game3 / "First*Order" width=8 f=$8. center;
compute FirstOrd_txt_&Game3; if _BREAK_="_RBREAK_" then call define(_COL_, "format", "comma6."); endcomp;
define FirstVal_txt_&Game3 / "First*Validation" width=8 f=$8. center;
compute FirstVal_txt_&Game3; if _BREAK_="_RBREAK_" then call define(_COL_, "format", "comma6."); endcomp;
define LastVal_txt_&Game3 / "Last*Validation" width=8 f=$8. center;
compute LastVal_txt_&Game3; if _BREAK_="_RBREAK_" then call define(_COL_, "format", "percent6."); endcomp;
break before table_label_remove / contents='' page;
/*compute before; totrets=current_ret.sum;
totorder1=; totval1=; pctval1=;
totorder2=; totval2=; pctval2=;
totorder3=; totval3=; pctval3=;
endcomp; */
rbreak after / summarize style={background=CXCAE1FF};
compute after; bname=trim(put(current_ret.sum, 6. -L))||" Retailers"; city='Total: ';
FirstOrd_txt_&Game1=trim(put(order_ret_&game1..sum, 6. -L)); FirstVal_txt_&Game1=trim(put(val_ret_&game1..sum, 6. -L)); LastVal_txt_&Game1=trim(put(val_ret_&game1..sum/current_ret.sum, percent8.1 -L));
FirstOrd_txt_&Game2=trim(put(order_ret_&game2..sum, 6. -L)); FirstVal_txt_&Game2=trim(put(val_ret_&game2..sum, 6. -L)); LastVal_txt_&Game2=trim(put(val_ret_&game2..sum/current_ret.sum, percent8.1 -L));
FirstOrd_txt_&Game3=trim(put(order_ret_&game3..sum, 6. -L)); FirstVal_txt_&Game3=trim(put(val_ret_&game3..sum, 6. -L)); LastVal_txt_&Game3=trim(put(val_ret_&game3..sum/current_ret.sum, percent8.1 -L));
endcomp;
where regname="&®&i" and lsrname="&&LSR&j";
title1 font=arial italic bold height=16pt "XXXXXXXXX";
title2 font=arial italic height=14pt "&LaunchDate Game Launch Orders and Validations";
title3 font=arial italic height=14pt "&®&i Region";
title4 font=arial italic height=14pt "&&LSR&j";
title5 font=arial italic height=8pt " ";
run; title; footnote;
%end; %end;
[/pre]
Message was edited by: Ross