by sum do you mean you are summing a value from details?
ther are afew ways to do this.
If you only looking to display the sums you can create a formula for grouping in a Crosstab you can disoplay in teh report footer or header
if left(totext(table.accountnumber,0,""),1)="7" then "7 description here" else "not 7 description here"
Use that to create a group in a CT and do a sum on the field you want summarized
or create two formulas and sum each one
//seven
if left(totext(table.accountnumber,0,""),1)="7" then tableamountfield else 0
//notseven
if left(totext(table.accountnumber,0,""),1)<>"7" then tableamountfield else 0
and do a sum of each of these