Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert a Form to a Report!
Message
De
05/09/2000 00:40:00
 
 
À
04/09/2000 15:15:59
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00412247
Message ID:
00412353
Vues:
20
Methinks I hear a call for SCX2FRX :-D

>>I created a nice Form (Legal Size) that I need to print with the associated data from a DBF. I need to create a Report but its almost the same work again.
>>
>>Any way to covert a Form to a Report?
>>
>>Any way to convert a Report to a Form?
>
>Since reports are not objects, Form to Report would be tricky - you'd have to write a rather nasty routine to covnert objects on a form to records in a report file. The other way round would be easier:
>Create a form object, like
>x=CreateObject('form')
>then open the .frx file and scan for objects you want (find the report format reference somewhere on your install disks, it's there and you'll need the meaning of each ObjType); for each of these objects do
>x.addobject([name comes here, you decide on naming], [class - decide which one fits best for each])
>And then you'd have to adjust the properties of the object depending on its properties on the report - position will need tweaking, because .frx files use their own measurement system; font and other properties are also somewhere, controlsource is in frx.expr field etc etc.
>In the end, x.saveas('yourform.scx') and that's it. You may even want to try to convert the dataenvironment of the .frx file - good luck with that, it'd be easier to imitate manually.
>I'm not recommending this at all, I'm only saying it's feasible... if you have many such forms and redoing them as .scx files would take too long. Still, these converted forms with have no methods at all, no behavior...
>Good luck & HT
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform