General information
Category:
Reports & Report designer
Hello Barbara,
I got the reports to work now. Thank you very very much for your help. Wish you the best.
Diane.
>The easiest way is to put the information you want saved in the CALLING form, not the form where you have the variables. I'm a little confused about your form names, so I'm going to rename them:
>1: Main form (MyMainForm) which has a "Get Report Parameters" button, a "Print Report" button and form properties for Product Name, Quality and any other variables you want to use in your parameters.
>2: Parameter Form (ParamForm) which has text boxes or combos for each parameter and a form property OCallingForm
>3: Report (MyReport)
>When you call the ParamForm from MyMainForm, pass the 'form object' of MyMainForm.
>Do form ParamForm with THISFORM && THISFORM will pass an Object type variable which refers to MyMainForm.
>In the INIT() of ParamForm, you'll have a parameter line and put the object into the form variable
**INIT Code
lparameter oForm
if type('oForm') ="O"
thisform.oCallingForm = oForm && This stores the variable you passsed to a form variable so you can use it any time.
endif
>In the OK button Click() code, you store the information back to MyMainForm
thisform.oCallingForm.ProductName = Thisform.TxtProductName.value
thisform.oCallingForm.Quality = thisform.TxtQuality.value
thisform.release
>You don't need to do anything with the UnLoad code - the information is already back in MyMainForm. Finally, you use the MyMainForm properties to update your cursor/view for the report.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only