Results 1 to 3 of 3

Thread: [RESOLVED] Looping Through Each Record

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2007
    Posts
    32

    Resolved [RESOLVED] Looping Through Each Record

    Hi everyone
    I using Crystal Reports XI release 2. Firstly I should explain what I need to have. In my database I have got a parent table called Initiatives and a child table called benefits. One initiative has got many benefits associated with it and benefits are updated regularly by the users. Now my manager wants me to create an Initiative reports in such a way that all the initiatives are displayed and against each initiative there should be a box filled with either of these colour (red, yellow, green).

    Let’s say if Initiative “X” has got 10 benefits and if one or more benefits are outstanding by more than 2% then the colour of the box should be red. And if no benefit is outstanding by more than 2% and one or more benefits are outstanding more then 1% and less then 2% then colour of box should be yellow. And if no benefit is outstanding more than 1% then colour of box should be green.

    Now for this I have created a report displaying all initiatives and a sub report with a SQL command containing the data from the benefits table. I have also included a database field which I would use as a box.

    Now I want to loop through each record of the crystal report till the last record and format the field as per condition. I would probably use nested loop to look for the status of the benefits but I don’t know how to do this in CR. In short I am looking to do this thing in CR

    While Recordset.EOF
    Do

    But I can’t find a key word for EOF or count-1 or some thing like that.
    Seeking the help of you guys.
    Regards,
    Last edited by faizee36; Jun 20th, 2007 at 07:30 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width