%define;stat1a(z1,z2,z3,z4) %reset_count; %foreach;sorted_list_item; %if;(prev_item.2 != item.2 or prev_item.1 != item.1) %reset_count;%incr_count; %expr(count - 1) %end; %end; %end; %define;stat1b(z1,z2,z3) %reset_count; %foreach;sorted_list_item; %incr_count; %if;(next_item.2 != item.2 or next_item.1 != item.1) %let;l1;%expr(item.2 + z1)%in; %let;l2;%if;(count > l_max_width)%l_max_width;%else;%count;%end;%in; %count; %reset_count; %end; %end; %end; %define;stat1(z1,z2,z3,z4) %if;(not cancel_links and l_max_dates > count) %apply;stat1a(z1,"z2","z3","z4") %else; %apply;stat1b(z1,"z2","z3") %end; %end; %define;stat2() %let;l_height;%expr(40 + (count *2))%in;