Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report preview headache
Message
From
01/12/1999 14:29:59
 
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00297450
Message ID:
00297474
Views:
17
>Has any seen this behaviour?
>The problem occurs only on user's machine not on my development machine. I'm using (still?) VB5. We are all on NT. There are two command buttons on the form, one is for previewing the current record the other for printing it. There should always be only one page printed (the current record). The print button works fine but if the user clicks the preview button and then clicks the print icon in the preview it cycles thru the entire table not just the current record.
>
>
>My original code was:
>KEYBOARD '{CTRL+F10}'
>REPORT FORM hf_let2 PREVIEW NEXT 1
>
>I then changed it to:
>KEYBOARD '{CTRL+F10}'
>REPORT FORM hf_let2 PREVIEW FOR id_complaint = lcComplaintId
>
>Both behave the same way. Any help would be appreciated.

The problem is that the filter condition specified in a REPORT FORM command only gets applied the first time through the report - so if you preview it, the filter "disappears" and the whole file is printed. The best solution I've found is to use a cursor with just the filered scope of records as the record source rather than the table; IOW, filter the records and then print/view the filtered set, rather than applying the filter to the REPORT FORM line.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform