Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't select record to print
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00018447
Message ID:
00018528
Views:
39
>>Hello, Everyone.
>>I've got a problem on REPORT FORM command. I can't select my desire record to print by REPORT FORM ... FOR command. In the print preview, all records of the table were displayed on the screen. It seem the command can't recongize the condition, however, I used SET FILTER command, it still can't work.
>>
>>The full sentence :
>>
>>REPORT FORM HOME()+"Report\Employee_All_Report.FRX" for Employee.staff_no=thisform.cur_staff_no PREVIEW
>>
>>where thisform.cur_staff_no is a value
>>
>>Also, I quit the program and tried this command on the command window but it still can't work.
>>
>>Is there anyone know why? I use this command many many times but I haven't face this problem before.
>>
>>Sunny
>
>Anything Strange in your data environment for the report. Try taking the table out of the data environment. Open it before running the report. Any strange functions imbedded within the report that maight cause problems? Are U using private data sessions? .... Steve

Sunny: Have you tried this with a real staff #? For example:

REPORT FORM HOME()+"Report\Employee_All_Report.FRX" for Employee.staff_no='12345' PREVIEW

I think you're having problems with the way the condition is written. Usually you need to set up the condition without referring to another form, because when it is read, you are inside the report.

cCond = "Employee.staff_no = '" + thisform.cur_staff_no + "'"

REPORT FORM HOME()+"Report\Employee_All_Report.FRX" for &cCond

Note that the value for thisform.Cur_staff_no is surrounded by quote marks which are added to the phrase. You have to be careful about single and double quotes!!! If you looked at cCond it would look like

Employee.staff_no = '12345'

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform