Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Cross-tab query
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00623905
Message ID:
00624107
Vues:
12
This message has been marked as a message which has helped to the initial question of the thread.
Nadya,

Use another select to get your composite cell values:

select ... padr( "S:" + transform( NumSales ) + " M:" + transform( NumMtgs ), 20 ) as WeekData ...

You can also just build a cursor of arbitrary width on the fly and populate the rows and columns with a couple of scan loops of the summary cursor.

>I have a table with this structure:
>
>Town        ExtrYear (C4)    ExtrWeek (C2)  NumSales I      NumMtgs I
>Avon        2002             02              10             4
>Boston      2002             02              300            100
>etc.
>
>User selects a week range (could be 4,5,12 weeks, whatever) and wants to see data in this way:
>
>Town  Frequency Recorded  Week 1       Week 2       Week3 ...
>Avon   4         2         S:10 M:4                 S:4 M:2
>Boston 4         3         S:300 M:100
>
>where frequency is taken from another table (predefined for each town) and Recorded is calculated (count for !empty(Num) in week, e.g. if we have Sales in Week1 and Week3 it would be 2)
>
>I've tried to use GenTab (using Cross-Tab Wizard), but I don't see, how can I show my Sales and Mortgages in one cell, how can I have Recorded field and how can I change captions for these fields (they displayed as C_200102, etc. and I don't want C_, preferably to have Week 200102 or just 200102).
>
>Could you please suggest me, how can I accomplish these requirements?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform