Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print current record only
Message
 
To
18/01/1997 12:50:21
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00017771
Message ID:
00017780
Views:
62
> I still can only print either record 1 only or all records.
> need to print... only the current record that the viewer would be looking
at.
>
> and uniqueid (which I really could not figure out)
> report form ... to print next 1

Fred, I feel your pain. <g> The REPORT FORM XYZ TO PRINT NEXT 1
should work every single time. (I use it successfully for weird reports.)
However, depending on how your REPORT FORM is setup, it will work
with no changes or it will mess up your user's data environment with the
environment you may have saved to the Report Form, on purpose or by
accident.

If I were you (I'm glad I'm not! You've got a FoxPro problem. <g> Just
kidding, Fred), I would open up that form all by itself in your development

environment, and take a look to see if whether or not that form also calls
up data tables and possibly even other relationships from one table or
another. Use the SET command at the command window level or from
the menu, Window, Data Session. (I'm going from loose mwmory here).
Anyhow, if you started with no tables open before you called up the report
form and after you opened the report form, you have tables open, you
have a hard-wired environment saved in your report form. And, of course,
when it is (re)called, it will open up the tables it needs, and put the
record
pointer at Record #1. This could easily cause the situation in which
you're
getting only record #1 to print. And, my guess is, that's exactly where
your problem lies. But, I could be wrong.

The UniqueID idea someone mentioned could just mean that whatever
record your user is sitting on (and the s/he wants to print) has some kind
of unique ID; i.e., the record has a unique index key that identifies it.
If
for whatever reason th end user was looking at an image of the table you
want to print from, one that would not put the record pointer sitting on
the
record your REPORT FORM should print, you would have to issue a
SEEK UniqueID right before you do the REPORT FORM XYZ NEXT 1.
It will work. If the record pointer is already in the proper place,
great!!

The main thing then is to be sure your report does *not* reposition the
record pointer in that table by (re)opening the table and sitting back at
record #1. I believe if you just get the environment cleared out of your
REPORT FORM (and possibly add some code to do the same if you're
depending on that environment for something else), the REPORT FORM
XYZ TO PRINT NEXT 1 will work like ac charm every time.

Fred, are you still awake? <g> Sorry this was so long but I thought maybe
it would help. (?)

==Carl
Carl J. Warner
Raytheon Engineers & Constructors
Birmingham, AL
==Carl

Carl J. Warner
VFUG Officer

The early bird gets the worm, but the second mouse gets the cheese.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform