Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I know when the record is the last in a group?
Message
De
17/12/2000 19:07:20
 
 
À
17/12/2000 13:55:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00454522
Message ID:
00454550
Vues:
44
You may want to consider using the print when option of the field.
This way you can use an expression to control when something is printed or not.

You could also use something like IIF(myexpression,myvalue,0) as your field contents.

To get the effect you desire it may be neccesary to preprocess the data before you run the report and flag those items which are the last in the group.

To do this you could write a select statement to select out the data with an additional tag field.
Then you could then use a scan loop to preprocess the data and flag those records you want to appear in your report.

You could also USE myfile AGAIN and then write a UDF that always looks one record ahead so that you can see if the group is going to change in advance.

This seems a bit of a long way round but off hand I cant think of a different way.

I suspect you may be aproaching your report the wrong way round.

Hope some of the above helps

Good Luck:)

>I grouped my data by month and what I want to do is that I want to set the data to 0 if it is not the last record in the group like shown below, what can I do? Or can report do that?
>
>Jan
>Mr. A $10000 <--- want to become 0
>Mr. B $20000
>Sum1= 30000
>Feb
>Mr. A $2000 <--- want to become 0
>Mr. B $3000 <--- want to become 0
>Mr. C $4000
>Sum2= 9000
>----------------------------
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform