Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying cross tab data?
Message
De
27/07/2007 13:49:01
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Divers
Thread ID:
01243774
Message ID:
01244192
Vues:
20
>I'm not sure either, but what steered me in the right direction was the use of the FIELD() API, in conjunction with tests for columncount FCOUNT(). Granted this is not perfect, as I can only put upwards of 10 columns in the report, but the user in theory could setup hundreds of columns (very unlikely).

The page mechanism is exactly the way you deal with an unknown number of columns. But perhaps the term "page" is confusing.

The idea is that, as with a spreadsheet, you have multiple pages across as well as down. So the calculation I showed is to figure out how many pages _wide_ the report is and the complex expression for each field lets you run the report multiple times, but get different results depending on the value of the nPage variable.

Say your user picks 87 columns and you've design the report with 10 columns. If you use the mechanism from Nancy's article, the nPages variable will be 9 and the REPORT FORM will run 9 times. The first time, it'll report on fields 1-10; the second time, fields 11-20, and so forth, until the last time through the loop, it does fields 81-87.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform