i need last line to every driver not accumlation to all line

ahmedba
Member Posts: 424
I make report to cars trips this report consist from following (required):
driver name quantity shipdate tripsLine
ahmed 50 12/04/2012 1
ahmed 60 12/04/2012 2
ahmed 30 12/04/2012 3
car no
101 ahmed 140 3
adil 40 12/04/2012 1
adil 20 12/04/2012 2
adil 10 12/04/2012 3
car no
102 adil 70 3
What i need as above
Now the proplem is trips line it make accumlation to all car no
ahmed finish with trips 3 it make to adil 4,5,6 how i make total to all trips to evey car no alone not accumlation
meaning i need last line value of trips to every driver
my report found in mediafire link is:
http://www.mediafire.com/?ul5yjfi8crar6f3
report id is 50052
please help me
driver name quantity shipdate tripsLine
ahmed 50 12/04/2012 1
ahmed 60 12/04/2012 2
ahmed 30 12/04/2012 3
car no
101 ahmed 140 3
adil 40 12/04/2012 1
adil 20 12/04/2012 2
adil 10 12/04/2012 3
car no
102 adil 70 3
What i need as above
Now the proplem is trips line it make accumlation to all car no
ahmed finish with trips 3 it make to adil 4,5,6 how i make total to all trips to evey car no alone not accumlation
meaning i need last line value of trips to every driver
my report found in mediafire link is:
http://www.mediafire.com/?ul5yjfi8crar6f3
report id is 50052
please help me
0
Comments
-
What grouping are you using? You will prehaps have to create a new key which is Truck No.,Driver No. or something like this.
You also need to put code in the pre-Section of the Shipment Header Group FooterCurrReport.SHOWOUTPUT := CurrReport.TOTASLSCAUSEDBY = FIELDNO("Truck Number");
Hope this gets you going.0 -
I grouping by truck no and code you write already written in group header of sales shipment header and i group sales shipment header by truck no . you can see report0
-
I test also what you say but the proplem still there it accumlate 1,2,3,4,5,67,7
and it not care about truck no0 -
I said to put the code here too.Shipment Header Group Footer
I did not see any code in the footer except the normal Nav code i.e. LastFieldNo := ''; etc....
As long as your grouping is correct on the Header then there should be no problem creating this report.
Albert0 -
I make as you tell me
what i need is every car no have serial or line after every car finish i want to make assign the variable value to 0 to start to another grouping because it make count to lines or serial to all
truck no what i need to these report count trips so that if every car make some trips it is false to sum all counts to all car but true it to make count to every car alone
car no 101
1
2
3
meaning value must be 3
car 102
1
2
3
but not 4 ,5,60 -
Ok try this
OBJECT Report 50052 mixertrip2 { OBJECT-PROPERTIES { Date=10/09/12; Time=12:43:50; Version List=; } PROPERTIES { } DATAITEMS { { PROPERTIES { DataItemTable=Table110; DataItemTableView=SORTING(Field50004); OnPreDataItem=BEGIN LastFieldNo := FIELDNO("Truck Number"); CurrReport.CREATETOTALS("Sales Shipment Line".Quantity); Creditbalance := 0; END; ReqFilterFields=Field50004,Shipment Date; GroupTotalFields=Field50004; } SECTIONS { { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18150; SectionHeight=1692; } CONTROLS { { 1000000001;Label ;0 ;0 ;7500 ;423 ;FontSize=8; FontBold=Yes; CaptionML=ENU=Sales Shipment Header } { 1000000002;TextBox;15000;0 ;3150 ;423 ;HorzAlign=Right; SourceExpr=FORMAT(TODAY,0,4) } { 1000000003;TextBox;0 ;423 ;7500 ;423 ;SourceExpr=COMPANYNAME } { 1000000004;TextBox;17700;423 ;450 ;423 ;CaptionML=ENU=Page; SourceExpr=CurrReport.PAGENO } { 1000000005;Label ;16950;423 ;750 ;423 ;ParentControl=1000000004 } { 1000000006;TextBox;15900;846 ;2250 ;423 ;HorzAlign=Right; SourceExpr=USERID } } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18150; SectionHeight=846; } CONTROLS { { 1000000012;Label ;0 ;0 ;1800 ;846 ;ParentControl=1000000011; VertAlign=Bottom; FontSize=10; FontBold=Yes; MultiLine=Yes } { 1000000015;Label ;2700 ;0 ;4500 ;846 ;ParentControl=1000000014; VertAlign=Bottom; FontSize=10; FontBold=Yes; MultiLine=Yes } { 1000000019;Shape ;0 ;746 ;18150;100 ;ShapeStyle=HorzLine } } } { PROPERTIES { SectionType=GroupHeader; SectionWidth=18150; SectionHeight=0; OnPreSection=BEGIN CurrReport.SHOWOUTPUT := CurrReport.TOTALSCAUSEDBY = FIELDNO("Truck Number"); END; } CONTROLS { } } { PROPERTIES { SectionType=Body; SectionWidth=18150; SectionHeight=0; } CONTROLS { } } { PROPERTIES { SectionType=GroupFooter; SectionWidth=18150; SectionHeight=423; OnPreSection=BEGIN CurrReport.SHOWOUTPUT := CurrReport.TOTALSCAUSEDBY = FIELDNO("Truck Number"); END; } CONTROLS { { 1000000011;TextBox;150 ;0 ;1800 ;423 ;HorzAlign=Right; FontSize=12; FontBold=Yes; SourceExpr="Truck Number" } { 1000000014;TextBox;2850 ;0 ;4500 ;423 ;HorzAlign=Left; FontSize=12; SourceExpr="Truck Driver Name" } { 1000000000;TextBox;9600 ;0 ;1800 ;423 ;FontSize=12; SourceExpr="Sales Shipment Line".Quantity } } } { PROPERTIES { SectionType=Footer; SectionWidth=18150; SectionHeight=846; } CONTROLS { { 1000000018;TextBox;9600 ;0 ;1800 ;423 ;SourceExpr="Sales Shipment Line".Quantity } { 1000000020;Shape ;0 ;0 ;18150;100 ;ShapeStyle=HorzLine } } } } } { PROPERTIES { DataItemIndent=1; DataItemTable=Table111; OnPreDataItem=BEGIN CurrReport.CREATETOTALS("Sales Shipment Line".Quantity); END; OnAfterGetRecord=BEGIN IF Quantity > 0 THEN Creditbalance := Creditbalance + 1 ELSE IF Quantity < 0 THEN Creditbalance := Creditbalance - 1; END; DataItemLink=Document No.=FIELD(No.), Sell-to Customer No.=FIELD(Sell-to Customer No.); } SECTIONS { { PROPERTIES { SectionType=Body; SectionWidth=18150; SectionHeight=423; } CONTROLS { { 1000000008;TextBox;1350 ;0 ;1200 ;423 ;SourceExpr="Shipment Date" } { 1000000010;TextBox;3450 ;0 ;4500 ;423 ;SourceExpr=Description } { 1000000016;TextBox;9600 ;0 ;1800 ;423 ;SourceExpr=Quantity } { 1000000007;TextBox;12300;0 ;1500 ;423 ;SourceExpr=[ Creditbalance ] } { 1000000017;Shape ;0 ;323 ;18150;100 ;ShapeStyle=HorzLine } } } } } } REQUESTFORM { PROPERTIES { Width=9020; Height=3410; } CONTROLS { } } REQUESTPAGE { PROPERTIES { } CONTROLS { } } CODE { VAR LastFieldNo@1000000000 : Integer; FooterPrinted@1000000001 : Boolean; ShipLine@1000000002 : Record 111; n@1000000003 : Decimal; Creditbalance@1000000004 : Decimal; BEGIN END. } }
You can copy and paste into a txt file and import you'll get the idea.0 -
I thanks you for reply but how i import this text file can you tell me what idea in report that can solve this proplem0
-
Result what i need is found in this link as following:
http://www.mediafire.com/view/?xyl902vv3q2rdu60
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