Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two different tables on one report
Message
 
À
09/12/1997 14:56:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00064748
Message ID:
00065099
Vues:
40
>>I want to create a report with two different and unrelated tables.
>>The first table wiil show a max of five records The second will show a max of about 50 records.
>>
>>I have created two seperate reports one for each table and each is fine.
>>
>>I want to be able to be able to run the shorter one then have the longer one print right after that continuing on the same page. Both tables have only one matching field and that field contains the same valve for all records.
>>
>>Can this be done.
>>
>>If not in foxpro. will cystal Reports do it.
>>
>>Any help would be greatly appreciated.
>>
>>Thanks Keith Hartman
>
>Yes it can bedone in Foxpro. Basically, you have to 'concatenate' two tables in one cursor doing following:
>1. CREATE CURSOR tmpReport with nuber of fileds=fcount("table1")+fcount("table2")+1, i.e. it will have enough space for any field plus one more field-report group identifier (e.g. 'listorder').
>2. You SCAN first table and INSERT into tmpReport (listorder,field1,field2..) VALUES(1,table1.field1,table1.field2)
>3. You do the same with the second table, but now you INSERT into tmpReport (listorder,field7,field8..) VALUES(2,table1.field1,table1.field2), i.e. other fields and another identifier.
>4. Now you create report form grouping by listorder and having as many report fields as necessary. Each field will use "Print When" setting evaluating Listorder value.


Edward:
Thanks for getting back to me your suggestion looks good. But I can't find anything in Create cursor that allows me to give the number of fields Please help me with the syntacs they don't tell you much in the manual.
Thanks Keith
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform