Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make an Index
Message
 
 
À
21/03/2002 07:58:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00635422
Message ID:
00635449
Vues:
12
>Hi all
>
>I have a file called PRODUCTS.DBF and is ordered by Category. On the report (.frx) I have a data group : CATEGORY.
>
>There is any way to make an index at the end of the report for example :
>CATEGORY          PAGE(FROM-TO)
>===============================
>DTR                1-20
>SOF                21-30
>JUI                31-46
>DET                47-76
>.....
>Is any way to take the _pageno variable when report group is changing ?
>
>Thanks in advance
>Petros

Create two variables lnStartPage and lcIndex. The first'll keep the start page # for the group. The index'll build in the second one. Here's what you've to do (not tested)
Local lnStartPage, lcIndex, lcCrLf
lcCrLf = CHR(13) + CHR(10)
lnStartPage = 0
lcIndex  = "CATEGORY          PAGE(FROM-TO)" + lcCrLf  + ;
           "===============================" + lcCrLf  
Select RepCursor
REPORT FORM ....

* Report
* In the group On ENTRY
_vfp.SetVar("lnStartPage", _PAGENO)

* In the group On EXIT 
_vfp.SetVar("lcIndex", PADR(GroupName, 32) + ;
    TRANSFORM(lnStartPage) + " - " + TRANSFORM(lnStartPage)) + lcCrLf  

* In the summary band add field with expression lcIndex. 
*  Make sure tha font is non-proportional, like Courier New
Alternatively, you can store page index info into the cursor instead of lcIndex variable.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform