Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending Variables to Reports
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00221356
Message ID:
00221569
Vues:
16
>>>The report should recognize
>>>
>>>Thisform.mypem...
>>
>>Hi Rich,
>>I like the approach, but it doesn't work for me. In the report's field object I tried thisform.myprop, activeform.myprop, & _Screen.myform.myprop W/O success.
>>
>>I didn't understand the other responder's use of the data environment to get at the form's properties.
>>
>>Is there a way to scope to the form from within the report? or Must I use a global var as others have suggested? Gee, I must be missing something simple here.
>
>Er, I'm Bruce...I have dozens of reports and no Publics, so I know it can be done :) Using Thisform will work from a form, generally, and also using locals in a custom method where a report is launched will work...however, if you run reports from outside a form - from menu, toolbar, there can be problems, of course...
>
>Where are you "launching" the reports from, exactly? For example, if you put a button on a form that says "Print" it should pick up any currently scoped property from the form or a local from the button for the report...

Oops! Sorry, Bruce... got my wires crossed. And right you are again. Although the button says "print", click fires the method oApp.reportmgr.rptprint() and that method does the REPORT FORM myreport. Seems like _screen.myform.myprop should be visible to the report, but causes the error "unknown member myform".
Hopefully there is a scoping solution without using globals. I could go off into oApp.reportmgr and add some rather generic properties. But report objects (i.e. special titles, selection criteria, etc.) should reasonably originate with the form and scope to the report, IMHO.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform