G
Guest
Hello,
I want to show the sum of order line amounts (e.g. 1,4,7 = 12) on one page and show in the page footer as well as in the page header of the following page. I use running sum in a hidden textbox in the detail section and show the result in the page footer by assigning =[cPOS_mTotal_NI_Running] to an unbound textbox. Doing the same in the page header would not show the same value as on the previous page but would also include the value of the first detail line. So I used =[cPOS_mTotal_NI_Running]-[cPOS_mTotal_NI] to exclude the first detail line. This works fine as long as there is at least one detail record on the second page. If not, the amount from the last detail record on the first page will be deducted.
Another try was to calculate the value for the header in the On Print event of the detail section and to assign the calculated value to an unbound field. This works if I print immediately - i.e. without doing a preview. With a preview and a subsequent print the printed values are doubled. I used the FormatCount value to sum only if it has a value of 1.
Any other ideas?
TIA, Norbert Meiss
I want to show the sum of order line amounts (e.g. 1,4,7 = 12) on one page and show in the page footer as well as in the page header of the following page. I use running sum in a hidden textbox in the detail section and show the result in the page footer by assigning =[cPOS_mTotal_NI_Running] to an unbound textbox. Doing the same in the page header would not show the same value as on the previous page but would also include the value of the first detail line. So I used =[cPOS_mTotal_NI_Running]-[cPOS_mTotal_NI] to exclude the first detail line. This works fine as long as there is at least one detail record on the second page. If not, the amount from the last detail record on the first page will be deducted.
Another try was to calculate the value for the header in the On Print event of the detail section and to assign the calculated value to an unbound field. This works if I print immediately - i.e. without doing a preview. With a preview and a subsequent print the printed values are doubled. I used the FormatCount value to sum only if it has a value of 1.
Any other ideas?
TIA, Norbert Meiss