I was hoping someone could help me out. I have a report that needs to take the sum of a group and use it to do a percentage calculation in a group header.
My code looks a little like this, unfortunately it is giving me the completely wrong result. Can anyone tell me what I may be doing wrong? Thanks
' Calculated in the Detail Section
WhileReadingRecords
global ValidCount as number
ValidCount = ValidCount + {Table1.Fieldname}
Formula = ""
' Get the average in the Group Header
WhilePrintingRecords
global ValidCount as number
global TotalValidCount as number
dim loResult as number
loResult = (ValidCount / TotalValidCount )
loResult = loResult * 100
Formula = loResult
' Total in the footer section
WhileReadingRecords
global TotalValidCount as number
Formula = TotalValidCount
My code looks a little like this, unfortunately it is giving me the completely wrong result. Can anyone tell me what I may be doing wrong? Thanks
' Calculated in the Detail Section
WhileReadingRecords
global ValidCount as number
ValidCount = ValidCount + {Table1.Fieldname}
Formula = ""
' Get the average in the Group Header
WhilePrintingRecords
global ValidCount as number
global TotalValidCount as number
dim loResult as number
loResult = (ValidCount / TotalValidCount )
loResult = loResult * 100
Formula = loResult
' Total in the footer section
WhileReadingRecords
global TotalValidCount as number
Formula = TotalValidCount