Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing a parameter
Message
From
04/10/2001 17:58:33
 
 
To
04/10/2001 17:46:41
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00564509
Message ID:
00564536
Views:
12
>>>Well, that is exactly what I did, but I am not happy with referencing a variable back to a textbox value on the form that calls the report, that's all.
>
>>Why do you need to reference it back?
>
>OK, let me rephrase that: I don't like the idea of using myForm.myTextbox.myValue for the variable being used to select records in the DE of a report. There has got to be a better way.

Hello Winn,

Then don't use the DE...create a cursor in a custom method of the form:
procedure printReport

select field1, field2 from myTable where field1 = thisForm.textBox1.value ;
    into cursor reportCursor
report form myReport to print prompt noconsole
In the report design itself, you don't need to put the cursor name on each field definition. You can simply put "field1", or "field2", etc...

If the form has a private datasession (usually a good idea), the report cursor will be released when the form is closed.

HTH,
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform