Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Geting an object to use a report's datasession
Message
De
04/04/2004 21:16:34
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00888906
Message ID:
00892157
Vues:
17
David,

Thanks! Will this run even if one doesnt drop any table to the DE? Was planning on manually opening (via USE) the table/s on the Init of the class.

Dennis

>Dennis,
>
>>How to do that?
>
>open the data environment of the report:
>
>
>*report.DE.Init()
>set procedure to myreportclass additive
>public goReport
>
>goReport = createobject( "myclass" )
>
>*report.DE.destory method:
>
>goReport = .null.
>release goReport
>
>* myreportclass.prg
>define class myclass as Custom
>iProp = 1
>
>function init()
>debugout program()
>endfunc
>
>function destroy()
>debugout program()
>endfunc
>
>function Increment()
>this.iProp = this.iProp + 1
>return str( this.iProp )
>
>function test()
>
>return str( x1.i1 * 2 )
>
>enddefine
>
>
>the x1 cursor gets created in the report's private DS, the object has access to the cursor in the test() method for example. You can drop fields onto the report and make their expressions like goReport.Increment() or goReport.Text().
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform