Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using CmdButton to Print/Preview Report
Message
From
29/10/1998 12:20:43
 
 
To
29/10/1998 12:10:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00152391
Message ID:
00152398
Views:
23
>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

You may make your code 100% reliable by selecting this one record to a cursor and print from this cursor.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform