Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I shorten this simple Crystal formula?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Divers
Thread ID:
00669488
Message ID:
00669493
Vues:
14
This message has been marked as the solution to the initial question of the thread.
Semicolons are optional. I would make this code easier read by moving all the NumberVar declarations to the top.

>I think I only need one If statement, but I always have fun with the semi-colons in Crystal formulas. I am never quite sure If and When I need to use the semi-colons where I have multiple command lines. Maybe there is a simple rule of thumb. Here's my simple code. Thanks!
>
>
>WhilePrintingRecords;
>NumberVar durat;
>If {observe.date} in {?s_date} to {?e_date} then
>    durat:=durat+VAL({observe.duration});
>NumberVar totdurat;
>If {observe.date} in {?s_date} to {?e_date} then
>    totdurat:=totdurat+VAL({observe.duration});
>NumberVar visit;
>If {observe.date} in {?s_date} to {?e_date} then
>    visit:=visit+1;
>NumberVar totvisit;
>If {observe.date} in {?s_date} to {?e_date} then
>    totvisit:=totvisit+1;
>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform