Hi,
I would like to print the word "TOTAL" as the label of the total line performed with the rbreak statement.
The folling code produces no error but it does not print the word "TOTAL" :
%macro tabFlux(MyTable, MyVarLi);
proc report nowd data=&MyTable missing;
column &MyVarLi entres sortis presents flux flux_p;
define &MyVarLi / group;
define flux_p / computed "Flux rapportés aux presents au 31 Déc. &MyAn. (%)";
compute flux_p;
flux_p=flux.sum/presents.sum*100;
endcomp;
compute &MyVarLi;
if _BREAK_="_RBREAK_" then &MyVarLi="TOTAL";
endcomp;
rbreak after / ol summarize style=[font_size=8pt font_weight=bold foreground=black background=gainsboro];
run;
%mend;
If someone has an idea it would be great.
Thanks.
Hi,
You are using an macro variable for &MYVARLI -- Let's say that the variable you pass to be a group variable is only a 1 byte character variable. In this case, you would only see the letter "T" in the output -- because an assignment like this is bound to the length (and type) of the variable whose cell value you want to change. If the variable you pass is a numeric variable, then the string "TOTAL" is not really something that can easily be placed in a "numeric" column. Can you explain a bit more about what type of variable you are passing to &MYVARLI??? Also, what is your destination of interest?? There is a PRETEXT method that will sometimes work, but not in the LISTING destination -- so what is your destination of interest?
cynthia
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.