Topic: Looping through records Help Posted: 19 Apr 2010 at 4:46am
Hi - I was hoping someone out there might be able to assist me with an issue. I have a list of records that displays Change tickets and their tasks. i.e. CH1234 Task 10 CH5678 Task 20 etc
In order for me to evaluate a condition on each record, it is fairly easy. The problem I have is when there are many tasks to a Change ticket and I need to evaluate the entire Change ticket based on type of tasks. i.e. CH1234 Task 10 CH1234 Task 20 CH5678 Task 30 What I need to do in this case is, evaluate CH1234 against TASK 10 and 20 and then say, if TASK 10 and 20 are XXXX overall Change Ticket is YYY. For this, I assume I need to read each line and do an evaluation.
Question: How do I read each record in a report and do an evaluation? I can I write something that says, as along as the Change Ticket # is the same, do this, but when the Change Ticket # changes, start over again on the new ticket?
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 20 Apr 2010 at 3:14am
subreports...They will read every line, or just select lines, and can be called multiple times...but the performance is going to take a hit.
I would use a stored procedure to gather the data from the database, and you can do your logic there, this would cut down on the number of hits to the database and utilize the speed and power of your database (and server) and make the report more responsive.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum