FIX: Incorrect Group Footer Sum Using Previous in PreviewLast reviewed: September 22, 1997Article ID: Q102463 |
2.5x 2.60
WINDOWS
kbtool kbprint kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSThe sum in a report group footer displays incorrectly when you choose Page Preview from the Report menu and use the Previous button to return to a page of the report that contains only one record in the group. However, the report does display correctly when the Next button is used, and it also prints correctly.
RESOLUTIONTo work around this problem, use a user-defined function (UDF) instead. Below is an example of a simple UDF that returns a group sum to the group footer of a report. The expression in the group footer is "grpsum(company)" (without the quotation marks), where COMPANY is the field that the report is being grouped on. YTDPURCH is the numeric field that is being summed.
PARAMETER grpvar * Store the current record number to a variable because the SUM * command moves the record pointer to the end of the file. m.rec=RECNO() SUM ytdpurch FOR company=grpvar TO sumvar * Set the record pointer back to the correct record. GOTO m.rec RETURN sumvarTo use this code, place it in a file called GRPSUM.PRG and save it in the same directory as the report.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in FoxPro version 2.6a for Windows.
MORE INFORMATION
Steps to Reproduce Problem
|
Additional reference words: FoxWin 2.50 2.50a 2.50b 2.60 fixlist2.60a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |