Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
3 unrelated files into one report
Message
De
25/04/2007 10:28:14
 
 
À
25/04/2007 10:24:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01219736
Message ID:
01219773
Vues:
8
>>>>>>>>>>Hi everybody,
>>>>>>>>>>
>>>>>>>>>>I have three simple tables called Software, Hardware, Other which only cDesciption and iActive_Flag fields not to count ID field. I have one form with 3 grids close to each other for these tables maintenance.
>>>>>>>>>>
>>>>>>>>>>Now I'd like to be able to print a 3 columns report for them. Is Excel my only option here? How would I show 1/0 field in Excel as a checkmark?
>>>>>>>>>>
>>>>>>>>>>Thanks a lot in advance.
>>>>>>>>>
>>>>>>>>>Why can't you combine three tables in one cursor and print regular report?
>>>>>>>>
>>>>>>>>Do you mean combining them based on record number (using 3 extra steps)? I thought about it, not sure if this is better.
>>>>>>>>
>>>>>>>>Thanks.
>>>>>>>
>>>>>>>I think - at least in vfp 6 - it's a more than 3 steps
>>>>>>>
>>>>>>>select Id, desc ;
>>>>>>>     from table1 ;
>>>>>>>     into cursor1 ;
>>>>>>>     order by ...
>>>>>>>
>>>>>>>select recno() as xxx, * from cursor1 into cursor cursor1 order by 1
>>>>>>>
>>>>>>>&& same for cursor2 and cursor3
>>>>>>>
>>>>>>>&& then do an outer join on xxx of all 3 cursors into one printcursor
>>>>>>>&& set the print when in the report to !isnull(column...desc)
>>>>>>>
>>>>>>
>>>>>>Yes, reading my mind, are you? <g>
>>>>>
>>>>>Not really. Just thinking aloud
>>>>>
>>>>>This is the fastest solution. Do not fiddle around with replace. It's slooooowwwwwwww
>>>>
>>>>If Rushmore is not there (obviously) then Select-SQL will perform the same scan, i.e. no gains in speed.
>>>
>>>
>>>Try it, and you will see
>>>
>>>(1) there are no vfp statements (ie the whole scan loop that is done 3 times) to process, hence faster
>>>(2) there's no &processing, hence faster
>>
>>1) Select-sql will make the same number of scans (joins) as in my code
>>2) in regard to '&', well it is too old. Please, be assured that if I would spend more than 5 minutes writing it, then I could easily eliminate '&' just to please you.
>
>I said to try it. First test (if you cannot understand why), then argue

You are very impolite, sir. Why can't you test my code, please note that I don't argue if you understand it or not.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform