Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reference to instantiated forms
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00104190
Message ID:
00104502
Views:
16
>>When I instantiate an object using DoForm, where can I get the reference to the new object created? For instance, I have a form I run with DOFORM("StatusForm"). Now how do I reference this new object from outside the form (i.e. I can't use THISFORM).
>
>You can get a reference to any instantiated form by using the Form Manager's Get() method [goApp.oForms.Get()].
>
>What specifically are you looking to reference on another form?
>

I'm still fighting with trying to get variables I pass from my form to appear on my report. The report view accepts the variables and uses them as parameters OK, but if I try to display the parameters in the report itself all I get is a blank entry.

So, in another report I'm working on I decided to just set-up a business object that has all the functionality to generate the cursor needed for my report. The parameters I use to generate the cursor are stored in properties of my object. The object also as a Print() method that runs my report (REPORT FORM blah blah). I dropped that business object onto my form that lets the user select the print options. When they click on the Print button, all of the options are saved in business object properties, and then it does: oARTReport.Print() to call the business objects Print() method.

In my report, I now need to reference the business object's properties so I can display the report parameters in the report. That's now why I need the form reference. So I can do a: oForm.oARTReport.Property
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform