Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DO FORM......NAME...LINKED
Message
 
 
To
28/05/1998 09:26:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00102548
Message ID:
00102761
Views:
28
Trisha,

If you are doing this in the Init of the report once that method ends, and the report then really begins generating output the modal form and your memvars are gone unless you declared then PUBLIC so they have a lifetime scope outside of the method.

If you created the VREPORTHEADER at the next higher program level, ie the one that starts the report in the first place you could define the memvars there as PRIVATE and the report would be able to see them.

Another approach would be to create a single record cursor with fields for these two items and either bind your form to them or replace the values after the form hides and then use the cursor fields in the report header band.

>Thanks for your help! :) I tried your suggestions and when I run the report I receive the message - Alias LOCOMPANY is not found. Does this mean that the memvar went out of scope?

That's exactly what it means, to the report object.property isn't distinguishable from alias.field. SInce the object doesn't exist it assumes it should find an alias named locompany.

>My modal form is still open, and I added code to display the values of loCompany.lretval, loCompany.cCompany & loCompany.cReportHeader, they still have their values just prior to the command REPORT FORM appaid. I even tried defining a variable and assigned it the value of loCompany.cReportHeader and used the variable name in my report. I then receive the message - Variable VREPORTHEADER is not found.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform