Hi,
I am very new to Dynamics NAV development and need some help with a report I am trying to build. I have been asked to build a report that will show the total weight of all purchases by period. I want to be able to filter on Entry Type (Purchase) and Posting Date (in a range, e.g. 01/01/11…31/12/11).
I have no idea how to do this though. I know I need to use the Item Legder Entry table as this contains: Item No., Posting Date, Entry Type, Document No., Total Cases, Total Weight.
I have no experience of NAV coding so was hoping to use the Report Wizard but when I tried using this, it totalled after each Item No. grouping but did not give me a grand total which is not what I need. I need to group by periods (sub-total) and have a grand total at the end, but there were no options in the Report Wizard
Any assistance you can give me would be greatly appreciated.
Kind Regards,
John
Hi John,
U Just move to the Report Wizard >> Item Legder Entry table >> Item Legder Entry table Data item >> Properties >> Total Fields and Group Total Fields Calcute Fields. Tag the Tables required to be Summed. And Get the required result.
Hope this would Solve your problem.
Regards,
Tirthankar Banerjee
Hi Tirthankar,
Thank you for your response, but this does not solve my issue. I still cannot group by periods (months) and all I have is the posting date. I need something like below:
January 2011
Item No. Posting Date Document No. Total Cases Total Weight
12345 01/01/11 doc123 2 200
56789 15/01/11 doc456 4 400
Total for period = 6 600
February 2011
Item No. Posting Date Document No. Total Cases Total Weight
12345 01/01/11 doc123 2 200
56789 15/01/11 doc456 4 400
Total for period = 6 600
Overall total = 12 1200
But I cannot group by periods and I cannot find a way to set an overall total.
I hope this makes it clearer?
Kind Regards,
John
You need to right code for that .define 2 global variables to store total.
After filtering for date –
if Purchas.Findset then begin
Repeat
WeightTotal += Purchaes.total weight ;
until Purchase.next=0;
end;
You need to right similar code for purchase total case .
I haven’t mentioned the trigger where to right it .find it