×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Use of the SKIP command

Use of the SKIP command

Use of the SKIP command

(OP)
I have a Legacy app with a report that reads both a parent and related child file. The two files are linked using the persons Number.
ie. Parent file: Name, Number
Child file (phone no.): Name, Number, Home, Work, Mobile

I want to conditionally SKIP Phone file (child) records. The problem is one Parent record may only be related to just a Home number (=1 phone file record) and another Parent record may have Home, Work & Mobile (=3 Phone related records).

So if I use SKIP(Phones,1) for the child phones file with 3 related records it still reports the remaining two.

If I use SKIP(Phone,3) it appears to work fine but is it problem to SKIP 3 records when for example there may only be one to skip in the phones file?

The Clarion help appears to assume the number of records to SKIP is constant where as mine vary.

So I guess my question is, is it safe to use SKIP(Phones, X) where X could be a greater number than the records to SKIP?

Thanks

RE: Use of the SKIP command

Hi!

SKIP is a leftover from CPD and ideally should not be used. In your case, you have no idea as to the no of Child records and so the best options if to use a LOOP i.e.

LOOP
   NEXT(Phones)

   IF ERRORCODE() OR Child.Number <> Parent.Number THEN BREAK.
END

Since I am totally forgotten Legacy, does a Legacy report use a VIEW?

Regards
 

RE: Use of the SKIP command

(OP)
Hi ShankarJ

I was concerned about using SKIP at all so you have answered my question, thank you.

I have had a look at VIEW in the help file but am unsure about its use with legacy.

I have the Phones file on the table schematic which I will remove and manually OPEN, LOOP, CLOSE using embeded code when conditionally required as you have suggested.

Regards


 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close