Get the same record from first DataItem after loop

DS
Member Posts: 4
Is is possible, after processing all the DataItems in a report, to start with the same record from the first DataItem again. Let me explain this a little bit more:
First DataItem
record 1
record 2
-Second DataItem
-record 1
-record 2
--Third DataItem
--record 1
--record 2
The Report starts with the First DataItem and record1 then goes to the Second DataItem etc. After the Third DataItem I would like to go to record 1 again from the first DataItem. Is this possible yes/no.
I can solve my problem, using an array or temp table, but I want it like described above.
Thanks in advance for reading and posting an answer.
First DataItem
record 1
record 2
-Second DataItem
-record 1
-record 2
--Third DataItem
--record 1
--record 2
The Report starts with the First DataItem and record1 then goes to the Second DataItem etc. After the Third DataItem I would like to go to record 1 again from the first DataItem. Is this possible yes/no.
I can solve my problem, using an array or temp table, but I want it like described above.
Thanks in advance for reading and posting an answer.
0
Comments
-
Sure, just create three dataitems based on the same table and with the same filter criteria as the first one. Set the key of the second and third dataitems so the user doesn't see them, so you only get filters on one of them. You then simply copy the filters from the first to the second to the third as you process them.0
-
what about this???
First DataItem - Loop (Integer)
First' DataItem
record 1
record 2
-Second' DataItem
-record 1
-record 2
--Third' DataItem
--record 1
--record 2
If you will filter the First dataitem (loop) for example SETRANGE("No.",1,3) it will execute your report 3-times...0 -
-
Kine, do you mean using the Integer (virual) table as the first DataItem. It seems to work quite well. I haven't finished my project yet, but with this hint it seems to come to an end.
DenSter, thanks for your answer too. I'll keep you guys updated and will post my answer here. Maybe usefull for somebody else.0 -
Just out of curiosity.... why not do this:
Dataitem1
Record 1
Do everything you need to do
Record 2
Do everything you need to do
Why loop through the same records more than once?0 -
I use five different DataItems like this:
DI1
-DI2
--DI3
-DI4
--DI5
In DI3 and DI5 I have to do a summation and when the answer exceeds a given amount, I have to print data from all the dataitems, if the answer doesn't exceed the given amount I don't wanna print that part. The flowcharts are telling me that printing almost occurs 'real time' and I don't see a possible way (without a loop, array, temp table...) to print all the preceding DI sections after reaching the end of DI5.
So, in the first case i'll loop the process again (the first run there is never a print --> SHOWOUTPUT(FALSE)) and start printing immediately, because I know the answere will exceed a given amount and in case two i'll go to the next record in DI1.
I hope this will explain a bit more and maybe it'll trigger some smart answers too;) My 'problem' is a lack of documentation and real life examples from users like you have when programming in Java etc. The learning curve is quite steep because you have to reinvent the wheel again sometimes. BTW, I'm hacking Navision for three weeks now.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