Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class Method in Report
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01309629
Message ID:
01309678
Views:
6
>>>Hi,
>>>
>>>Is it possible to use a class method as the expression for a report field?
>>>I guess I'm really just asking how/whether one can instantiate a class object in the report?
>>>TIA,
>>>Viv
>>
>>You can call any object.method from the report form, as long as report 'sees' the object, i.e. you should declare the object either as Public, if it is something generic and you will call it from many places, or as Local in the same method from where you call your report form. Within the called method you can do any commands.
>
>Thanks,
>Since I have an existing instance of the object in question as a form property I guess that I can just create a local reference to this in the method that calls the report....
>Regards,
>Viv

Again, you don't have to.

thisform.myObject.myMethod() syntax would work just fine. But you may want to wrap it into the condition if vartype(thisform) = 'O'
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform