Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using CmdButton to Print/Preview Report
Message
From
29/10/1998 12:10:41
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Using CmdButton to Print/Preview Report
Miscellaneous
Thread ID:
00152391
Message ID:
00152391
Views:
64
I have designed in intake form which uses a field called "Names.name_id" as the primary field Names table to like all other tables in the database. On my form I have a command button fror printing (and one for previewing) a report which basically prints out all the information on the intake form. The problem I'm having is this: sometimes it works fine (depending on which page of the form you are on, but sometimes the "Print Report" CmdButton will cause a report to print for every record in the database rather than just the record that is being displayed on the screen (which is the only record that should be printed). Also the "Preview Report" CmdButton displays the correct report but if you hit the printer icon with report displayed it prints reports for all records.

The "Print Report" button has the following code in the click event: PreRepID = Names.name_id
Report Form Intake.frx For Names.name_id = PreRepID To Printer

The "Preview Report" click event is similar:
PreRepID = Names.name_id
Report Form Intake.frx For Names.name_id = PreRepID Preview

Any suggestions?
TIA
--Lincoln
Next
Reply
Map
View

Click here to load this message in the networking platform