Jan 7, 2005 #1 tomk01 ISP Oct 18, 2004 69 US Hello All, Is there a way to sum the max of a number example database 15.5 13.5 12.2 report 15.5 13.5 (both max) what I need 15.5 13.5 -------- 29.0
Hello All, Is there a way to sum the max of a number example database 15.5 13.5 12.2 report 15.5 13.5 (both max) what I need 15.5 13.5 -------- 29.0
Jan 7, 2005 #2 Wacki Programmer Oct 28, 2004 35 US create a summary formula for the field in the database Sum ( db.fieldname ) Wacki Upvote 0 Downvote
Jan 7, 2005 Thread starter #3 tomk01 ISP Oct 18, 2004 69 US when I do that I get the "cant calc running total Upvote 0 Downvote
Jan 7, 2005 #4 Wacki Programmer Oct 28, 2004 35 US Try placing an evaluation time at the top of your function someting like 'WhileReadingRecords' should help. Wacki Upvote 0 Downvote
Try placing an evaluation time at the top of your function someting like 'WhileReadingRecords' should help. Wacki
Jan 7, 2005 #5 lbass Technical User Feb 9, 2002 32,816 US You haven't shown your group field. You could either create two formulas like the following: //{@accum} to be placed in the group header or footer: whileprintingrecords; numbervar summax := summax + maximum({table.amt},{table.group}) //{@display} to be placed in the report footer: whileprintingrecords; numbervar summax; Or you could create a SQL expression like the following {%maxamt}: (select max(AKA.`amt`) from Table AKA where AKA.`groupfield` = Table.`groupfield`) You would substitute your table name wherever you see "Table", your exact field names for "amt" and "groupfield". Then in the record selection formula use: {table.amt} = {%maxamt} Then you could just insert a summary on {%maxamt}. -LB Upvote 0 Downvote
You haven't shown your group field. You could either create two formulas like the following: //{@accum} to be placed in the group header or footer: whileprintingrecords; numbervar summax := summax + maximum({table.amt},{table.group}) //{@display} to be placed in the report footer: whileprintingrecords; numbervar summax; Or you could create a SQL expression like the following {%maxamt}: (select max(AKA.`amt`) from Table AKA where AKA.`groupfield` = Table.`groupfield`) You would substitute your table name wherever you see "Table", your exact field names for "amt" and "groupfield". Then in the record selection formula use: {table.amt} = {%maxamt} Then you could just insert a summary on {%maxamt}. -LB