Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Run code in report form
Message
De
12/01/2009 11:36:49
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
12/01/2009 11:31:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01372806
Message ID:
01372839
Vues:
17
>>>>I want to be able to run a block of code in the report form when it first starts. How can I do that? The reason is that for this particular report, I want to run SQL against the current alias and create a generic cursor (Fld001, Fld001, etc.). This cannot be done in code priort to the REPORT FORM statement in the calling code.
>>>
>>>Why "This cannot be done in code priort to the REPORT FORM statement in the calling code."? Report have some private datasession? If so you can run the code in report DE.OpenTables.
>>>
>>>Or an easy alternative would be a call to a user defined function from within report. ie: add a field in report title with a call to UDF().
>>>Cetin
>>
>>Also, see the stupid reply I made to myself: "Will any references I make to a variable or the cursor created in the function be available for all groupings and detail field in the report?"
>>
>>I really wish UT would warn you when you reply to yourself.
>
>I don't understand:)

If you look at the entire thread, you will.

>As for the varables you can think o it as all the variables accessible by the routine that called the report command. You wouldn't have access to variables created in UDF.

No, I meant that if run the UDF from the report title, will I have access then to the cursor I created there? And if I also returned a variable from the UDF, would the report have access to that? Do I need to somehow return the cursor as well? Will it be out of scope once I get back to the report from the UDF?

>PS: I really don't understand why it cannot be done before report (and I would bet you can).

I know. That code is at a class-level that cannot contain this code. Just trust me on this one.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform