Crystal Report Sum of Average -
i new crystal report. have tried many ways have not able solve issue few days. can help solve issue?
here results displayed in detail section after bring together table table b
id | charge | type d428 | 35 | l d440 | 54 | l d440 | 54 | l d435 | 28 | w d435 | 28 | w d448 | 32 | l d452 | 37 | l d465 | 20 | w d465 | 20 | w how calculate sum of average "charge" based on status "type" , grouping "id"?
for example:
sum avg type l : 35(d428) + 54(d440) + 32(d448) + 37(d452) = 158 sum avg type w : 28(d435) + 20(d465) = 48 avg l: 258 / 4 id = 39.5 avg w: 48 / 2 = 24 i tried run total field calculate avg cannot combine status , grouping in evaluation section. can take either formula: type = 'l' or grouping id.
to rid of duplicate records utilize alternative select distinct records in database menu.
group type , place id , charge in detail section
now take sum of charge , count of id in grouping footer.
create formula @average , write belwo code there: place formula right part after summary , count
sum ({charge}, {type})/count({charge}, {type}) above illustration when take summary , count alter values per report.
inl grouping have average l , in w grouping have average w crystal-reports
No comments:
Post a Comment