Soundsmith
Programmer
I'm running VFP 6.0 on a Win2000 platform. I have a report which gets Primary Language data from a table. The client needs totals and percentages at three levels, Unit, Division and Grand total.
I compute the Unit levels as values in the table, with an additional field for row totals. Then the rows are reported as detail items, with a second row on the report detail band directly below the values which shows the percentage relative to the row total, Ltotal.
The formula for column L7 (English language,) for example is
IIF(L7>0,IIF((INT((L7/Ltotal*100)+.5)=0),'<1%',(STR(INT((L7/Ltotal*100)+.5))+'%')),'')
This formula is repeated under each of 39 languages, and works perfectly for each row. The problem is with the groups. Group sub-totals and grand totals are computed using the same formula in the group band, with the Calculate field set for the appropriate group level.
Group totals display correctly, but I am unable to get the percentages to work, they always use the last row value rather than the group value no matter how I set the Calculate field selection.
I've tried, just to test, breaking this down to a far simpler IIF(L7>0,L7/Ltotal,0). The result is the same.
How can I get these to work? I could swear they worked perfectly under Windows 98, and the customer never had a problem, but since we've updated, this has changed.
David 'Dasher' Kempton
The Soundsmith
I compute the Unit levels as values in the table, with an additional field for row totals. Then the rows are reported as detail items, with a second row on the report detail band directly below the values which shows the percentage relative to the row total, Ltotal.
The formula for column L7 (English language,) for example is
IIF(L7>0,IIF((INT((L7/Ltotal*100)+.5)=0),'<1%',(STR(INT((L7/Ltotal*100)+.5))+'%')),'')
This formula is repeated under each of 39 languages, and works perfectly for each row. The problem is with the groups. Group sub-totals and grand totals are computed using the same formula in the group band, with the Calculate field set for the appropriate group level.
Group totals display correctly, but I am unable to get the percentages to work, they always use the last row value rather than the group value no matter how I set the Calculate field selection.
I've tried, just to test, breaking this down to a far simpler IIF(L7>0,L7/Ltotal,0). The result is the same.
How can I get these to work? I could swear they worked perfectly under Windows 98, and the customer never had a problem, but since we've updated, this has changed.
David 'Dasher' Kempton
The Soundsmith