Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Knowing the last record in the detail line
Message
 
À
21/05/2003 16:42:46
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00790979
Message ID:
00791360
Vues:
30
This message has been marked as the solution to the initial question of the thread.
So, you want this to print in the detail, not the group footer at all. I normally build a cursor for running reports. Assuming you're doing that, add a logical field to the cursor called Last4Date. Once you've built the cursor, do a second pass through the cursor, setting the Last4Date to .T. for the last record within each date.

You'll also need two objects on the report, one in red and one in black. These should be on top of each other. In the PrintWhen expression for the object in red, put Last4Date AND Amount < 0. In the PrintWhen expression for the object in black, put (NOT Last4Date OR Amount >= 0).

>Let's say I have a table with 5 records:
>
>Date Amount
>========== ==========
>05/19/2003 987.65
>05/20/2003 1234.56
>05/20/2003 -7890.12
>05/20/2003 -99.99
>05/21/2003 5678.90
>
>I want to be able to identify that the -99.99 value is negative or not. I will then use the PrintWhen to display it as red. I do not want the -7890.12 to be red. It is only the last record for that date that should be evaluated. The very little bit that I unsucessfully tried using variables and groupings really isn't an issue here. What I tried didn't work and I was looking for other solutions.
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform