How to show the total amount on header
liizz
Posts: 125
Hello,
I have made a report based on Sales Invoice Header which uses the properties GroupTotalFields and TotalFields.
A grouping is made on Posting Date and the field Amount is being used on TotalFields.
The grand total for amount is ok on the footer.
Now, user wants to show the total amount also on header.
Can anybody suggest how to display also the total amount on the header section for the report.
Thanks
Plz help
Liizz
I have made a report based on Sales Invoice Header which uses the properties GroupTotalFields and TotalFields.
A grouping is made on Posting Date and the field Amount is being used on TotalFields.
The grand total for amount is ok on the footer.
Now, user wants to show the total amount also on header.
Can anybody suggest how to display also the total amount on the header section for the report.
Thanks
Plz help
Liizz
0
Comments
-
just create a function that total the amount of sales invoice and call it in the header.
similar to this.
paramaters
Var Name DataType Subtype Length
Yes SalesHeader Record Sales Header
Local Var
lSalesline Record Sales Line
lAmt Decimal
GetTotalAmt(VAR SalesHeader : Record "Sales Header") : Decimal
lAmt := 0;
clear(lSalesline);
lSalesline.setrange("Document type",SalesHeader."Document type");
lSalesline.setrange("Document no.",SalesHeader."No.");
if lSalesline.findset then
repeat
lAmt += lSalesline."Line amount";
until lSalesline.next = 0;
exit(lAmt);
or you can use the Amount field in the heade but you need to released the document first.Sendoh
be smart before being a clever.0 -
There is a field in Sales Line Table Called Amount To Customer .
This may help you.Now or Never0 -
Thanks for ur replies.
But when I call the function in the section part of the report, should i define a new global record variable for Sales Header to pass as parameter while calling the function?
Thanks
Plz advise.
Liizz0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
