Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PRINT PREVIEW
Message
 
 
À
04/04/2001 07:42:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00491252
Message ID:
00491798
Vues:
7
>>Please pardon me, but how do you put a UDF in a Report Header ?
>>Where is Report Header in Frx ?
>
>PMFJI,
>
>I think what Nadya was suggesting was to put a field into the top band of the report (The report header) but instead of putting a normal field (eg Mytable.MyField) put in a call to a function which return an empty string
>
>You need to put the function into your procedure library or have it in a .PRG which the report can find - or you can create an object reference to the calling form from the method which calls the report.
>
>EG.
>
Local loMyForm
>loMyform = Thisform
>Report Form MyReport.frx
>
>In the field at the top of the report add a field which says loMyForm.NadyasFunc()
>Apparently the Local Variable is still visible from the report (I read that here on UT) - if not then make it Public
>
>
>Then on the form add a method called NadyasFunc with the code in it.
>Make sure it returns ""
>
>HTH
Nice explanation, Will! The only one change I would propose to use CountPrints() instead of NadyasFunc() :) Also you can use private variables, if local would not work - no need for public. And finally, you can also use OnEntry/OnExit to put function, though putting a field in a report header seems to be more "visible".
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform