I have searched the topics and have managed to put a counter on a report i am currently doing. One thing i cant get it to do is reset though. I have set the following ; OnPreDataItem() Counter := 0; OnAfterGetRecord() Counter := Counter + 1; I have put the counter in the Group Footer Section of the Report - and this shows in the right place, only it is a running total, rather than total for the group. I thought the PreData Item = 0 would zero it for each section. Am I missing something from OnPostData ?? Also as all i am interested in is the totals for each pack size i have done the following : Header 2 has my Pack Size Heading Body has my Pack Size Field in : and i have “skipped” this section, but putting a C/AL code in the OnPreSection. The group footer contains my count field. Apart from the wrong count, the report does only show the total, but it is also missing the pack size. Is there anyway i can get it to show : PACK SIZE (Header) Count / Quantity Packsize1 2 Packsize2 1 Packsize3 5 etc Thank you
Hi You could try this OnPreDataItem() CurrReport.CREATETOTAL(Counter); Counter := 0; OnAfterGetRecord() Counter := 1; See how this affects your packsize totals, and we can then take it from there.
Thanks for your reply. I have tried adding that, however it gives “you have specified an unknown variable CREATETOTAL” error when i try to run. I have put in C/al globals variables CREATETOTAL and set is an interger (and decimal!) but with no luck
[:I][:I] Sorry - I must learn to spell and type [:I][:I] It should of read OnPreDataItem() CurrReport.CREATETOTALS(Counter); Counter := 0; OnAfterGetRecord() Counter := 1;
CREATETOTALS → there is an “S” missing [:)] Using the Symbol Menu (F5) is of great help on these situations. Good luck!
Thanks all sorted now!!! sorted my headers too i shall have another question tomorrow!