groups - Crystal Reports Dynamic Groupings -
i new in crystal reports don't know do
how can make group formula:
in main report
if distinctcount ({prod.group_id}, {prod.id_no})=1 //group prod.group_id else if distinctcount ({prod.group_id}, {prod.id_no})>1 , ({prod.group_id}=previous({prod.group_id}) or {prod.group_id}=next({prod.group_id})) //group prod.doc_id else //group prod.group_id
please me new in crystal reports , need make badly
i have in main report:
in group header , group {prod.group_id}
sub_car
sub_airplane
some of sub reports working when group {prod.group_id} , sub reports works when group {prod.doc_id}
you trying group result of grouping regroup not possbile way wrote formula because distinctcount ({prod.group_id}, {prod.id_no})
output of grouping.
to achive need use sub report , pass distinct count use grouping in sub report.
take section group footer b
, place sub report there , using change sub report links
pass distinctcount ({prod.group_id}, {prod.id_no})
sub report
in sub report appearing in parameter fields {?distinctcount ({prod.group_id}, {prod.id_no})}
create formula @grouping
, write below code:
if {?distinctcount ({prod.group_id}, {prod.id_no})}=1 //group prod.group_id else if {?distinctcount ({prod.group_id}, {prod.id_no})}>1 , ({prod.group_id}=previous({prod.group_id}) or {prod.group_id}=next({prod.group_id})) //group prod.doc_id else //group prod.group_id
now use formula group sub report... if wish display data in main report or remove fields of main report , show sub report
Comments
Post a Comment