Still can't figure out totals..

yuppicide
Member Posts: 410
Navision 3.10..
Still can't figure out how to get totals to work properly.
I'm trying to make a new report, which is a combination of two reports relating to inventory.
On one report I want to use "Qty. on Sales Order" and QtyAvailable. on another report I want to use "Sales (Qty.)".
I've taken the first report and saved it as a new one.. deleted everything I did not want to show. Now I wanted to add in that "Sales (Qty.)" field.
If run the report I've taken that from, it shows the following:
I've circled in red the figures I want to take and put on the other report.
Here's how it shows up instead:
I've circled in red how they come out with the 0's.
What I did was add =<"Sales (Qty.)" to the Item, Body sections on my report, as well as Item, Footer section. I then added =<Item."Sales (Qty.)" to the Item Variant, Body.
When I tried to add the "Sales (Qty.)" and tried to compile it gave me an error, so I added that to C/AL Globals, yet on the original report I took it from doesn't have it in C/AL Globals. As of writing this I tested and went into my newly created report and deleted it from Globals and it compiled fine. Weird.
Still can't figure out how to get totals to work properly.
I'm trying to make a new report, which is a combination of two reports relating to inventory.
On one report I want to use "Qty. on Sales Order" and QtyAvailable. on another report I want to use "Sales (Qty.)".
I've taken the first report and saved it as a new one.. deleted everything I did not want to show. Now I wanted to add in that "Sales (Qty.)" field.
If run the report I've taken that from, it shows the following:
I've circled in red the figures I want to take and put on the other report.
Here's how it shows up instead:
I've circled in red how they come out with the 0's.
What I did was add =<"Sales (Qty.)" to the Item, Body sections on my report, as well as Item, Footer section. I then added =<Item."Sales (Qty.)" to the Item Variant, Body.
When I tried to add the "Sales (Qty.)" and tried to compile it gave me an error, so I added that to C/AL Globals, yet on the original report I took it from doesn't have it in C/AL Globals. As of writing this I tested and went into my newly created report and deleted it from Globals and it compiled fine. Weird.
0
Comments
-
Do not forget to add the field into TotalFields property of the dataitem to automatially calc the totals...0
-
Yes, sorry, I have the following in <Item> Code:
CurrReport.CREATETOTALS("Sales (Qty.)",TotalValue,"Quantity on Hand", "Qty. on Purch. Order","Qty. on Sales Order", QtyAvailable );
It's the first one on the list.
In <Item Variant> I put the following code:CurrReport.CREATETOTALS(Item."Sales (Qty.)" );
0 -
Are your using CALCFIELDS somewhere for these flowfields?
Without defining calcfields for those fields they will appear as zero
Since you have a report that already works - review all the c/al code on dataitems &
view sections see the code there too and dataitem properties.
ex/
OnPreDataItem()
CurrReport.CREATETOTALS(Item."Sales (Qty.)",Item."Sales ($)");
OnAfterGetRecord()
CALCFIELDS("Sales (Qty.)","Sales ($)");0 -
Yes. I will look through the code. Looking there I've got it to print 18 all the way down so far.. will keep messing around with it.Savatage wrote:Are your using CALCFIELDS somewhere for these flowfields?
Without defining calcfields for those fields they will appear as zero
Since you have a report that already works - review all the c/al code on dataitems &
view sections see the code there too and dataitem properties.
ex/
OnPreDataItem()
CurrReport.CREATETOTALS(Item."Sales (Qty.)",Item."Sales ($)");
OnAfterGetRecord()
CALCFIELDS("Sales (Qty.)","Sales ($)");0 -
I still can't get this to work. Might abandon this project (and anything with a total in the future lol).
After much fooling around and deleting my newly modified reports to start fresh, this is where I am at.
I have dual monitor setup, so in one last attempt I've started over once again. I have my newly modified report on one monitor, and the report I want Sales (Qty.) from on the other monitor. This way I can compare code and information easily.
It correctly shows everything except for the item from the other report.
For the Sales (Qty.) it shows the following on my report:ITEM NO. VARIANT CODE SALES (QTY.) 3140-0440 18 BLACKL 18 BLACKM 18 BLACKS 18 BLACKXL 18 LILACL 18 LILACM 18 LILACS 18 LILACXL 18 TAUPEL 18 TAUPEM 18 TAUPES 18 TAUPEXL 18
The quantity is doing 18 all the way down no matter what I've tried. It should be show 0,0,0,0 for Black, 4,4,2,2 for Lilac, and 2,2,1,1 for Taupe which equals 18 total.0 -
obviously it's not resetting by variant. you're getting the full total. Are you pulling the full total from the item card or item ledger entry?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions