Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I find out the missing ticket ?
Message
De
30/07/2001 08:17:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
30/07/2001 08:07:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00537118
Message ID:
00537123
Vues:
20
>I have a set of record with the running
>ticket number. Can the Crystal report or foxpro report find out the missing ticket number from running ticket number ? How?
>
>Any coding or help will appreciate. Thanks

Do you mean, you have numbers like "1, 2, 3, 5, 6" and want to find what numbers are missing (in the example, "4")?

There is no fast way to do this with Visual FoxPro reports. However, you can easily write a loop to copy the missing numbers into a cursor.

Pseudocode:
Get the lowest number.
Get the highest number.
Create cursor
for i = lowest to highest
   if not seek()
      insert into cursor
   endif
next
You could get faster performance by scanning through the table, and checking if the difference between one record and the next is greater than 1.

Is this what you mean?

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform