Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group report by 2
Message
 
À
25/06/2004 12:04:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00917115
Message ID:
00917349
Vues:
16
>Let me see; perhaps I was confusing it with recno(). Would the variable be increased AFTER the record is printed?

Ah .. I see where the confusion is. The first time the data group expression is getting evaluated, the variable hasn't been processed yet because the detail band hasn't been processed yet, so int(0/2) = 0.

Variables don't get processed until the detail band is about to be processed. Any Page header or Group Header is processed BEFORE the report variables for the next detail band are processed.

Cathy


>
>I was reasoning like this:
>
>For the first record (I was assuming the variable, rnLineCounter, would be equal to 1), int(1/2) = 0.
>
>For the second record, int(2/2) = 1, so that would be a different group. Am I making the wrong assumptions about the way the variable is evaluated?
>
>>
>>
>>
>>>I suggest a slight correction: adjust the expression to
>>>
>>>
>>>int((rnLineCounter+1)/2)
>>>
>>>
>>>Otherwise, the first record will appear by itself.
>>>
>>>
>>>>Create a report variable called rnLineCounter, set it to COUNT() and reset at end of report.
>>>>
>>>>Add a data group with the expression of INT(rnLineCounter/2).
>>>>
>>>>Now you can expand the size of the data group footer to give you the white space between every set of two records.
>>>>
>>>>Cathy
>>>>
>>>>
>>>>>i want my report to appear like this,
>>>>>
>>>>>record 1
>>>>>record 2
>>>>>
>>>>>record 3
>>>>>record 4
>>>>>
>>>>>record 5
>>>>>record 6
>>>>>.
>>>>>.
>>>>>.
>>>>>.
>>>>>etc
>>>>>
>>>>>how do i do that? pls help. TIA.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform