I have a report that lists scores for archers using different bow types. The report groups by bow type and sorts by score. I have added a field named "LineNo" =1 and summed over groups, this gives the position of each archer within the group.
I now want to divide the groups into teams, two archers per team for bow types "Longbow" and "Barebow" and three archers per team for "Compound" and "Recurve".
The result I want is a field in the report printing teams as 1.1, 1.2 2.1, 2.2, 3.1,3.2 etc. for Longbow/Barebow and 1.1, 1.2, 1.3, 2.1, 2.2, 2.3, 3.1, 3.2, 3.3 etc for Compound/Recurve
I have added calculated field to the report called Teams. The calculation is quite complex but is the simplest way I could think of :
"=IIf([bow]="Recurve" Or [bow]="Compound",Int(([LineNo]-0.0001)/3)+1+([LineNo]-(Int(([lineno]-0.0001)/3))*3)/10,
Int(([LineNo]-0.0001)/2)+1+([LineNo]-(Int(([lineno]-0.0001)/2))*2)/10)"
This works fine in Design mode as can be seen in the attached report "Correct Print" but when I save it and try again the calculated field is corrupted as per the attached file "Corrupt print".
Where am I going wrong as it seems work fine until I close the database and reopen it?
I now want to divide the groups into teams, two archers per team for bow types "Longbow" and "Barebow" and three archers per team for "Compound" and "Recurve".
The result I want is a field in the report printing teams as 1.1, 1.2 2.1, 2.2, 3.1,3.2 etc. for Longbow/Barebow and 1.1, 1.2, 1.3, 2.1, 2.2, 2.3, 3.1, 3.2, 3.3 etc for Compound/Recurve
I have added calculated field to the report called Teams. The calculation is quite complex but is the simplest way I could think of :
"=IIf([bow]="Recurve" Or [bow]="Compound",Int(([LineNo]-0.0001)/3)+1+([LineNo]-(Int(([lineno]-0.0001)/3))*3)/10,
Int(([LineNo]-0.0001)/2)+1+([LineNo]-(Int(([lineno]-0.0001)/2))*2)/10)"
This works fine in Design mode as can be seen in the attached report "Correct Print" but when I save it and try again the calculated field is corrupted as per the attached file "Corrupt print".
Where am I going wrong as it seems work fine until I close the database and reopen it?