Re: I Hate this kind of problem. Please Help
- From: "Jeff Grippe" <jeff@xxxxxxxxx>
- Date: Mon, 11 Feb 2008 16:11:00 -0500
I got a variation of the method suggested by Gregory (below) to work
although it doesn't seem like I should have to do this.
I created a textbox on the form. When the user right clicks on the context
menu and select the option to print the document, I set focus to the
textbox. The setfocus method of the textbox calls the routine which gathers
the data and prints and then is sets the focus back to the grid.
I should have said this upfront but I'm using VFP 7.0 SP 2
Thanks again,
Jeff
"swdev2" <wsanders@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:OXHED3NbIHA.4180@xxxxxxxxxxxxxxxxxxxxxxx
Jeff - thanks for the checking !
Ok - to narrow this down, it's only happening during the FIRST time this
is
called.
I remember (with VFP 6) there was some scoping problem with right click
menus -
ie - a right-click 'thing' somehow got top level object, and sometimes
could
not see other objects
that might have been exposed at (this) and (thisform) level.
For example, a few times the data environment / data session got switched
out during a right click.
We had no code that did this, it was some side effect.
Is there anything you can do to get to the right data session / data
environment inside of the program thats called with the right click method
?
Regards [Bill]
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.terrafox.net www.viasqlserver.net
"Jeff Grippe" <jeff@xxxxxxxxx> wrote in message
news:13r10rnli4qh6b8@xxxxxxxxxxxxxxxxxxxxx
Hi William,data
The report does not have a private data session and when I inspect the
environment in the report it is blank.to
I added a go top to the code after the select and before the report and I
still get the error the first time the report is called. Every other time
through the program there is no problem.
Thanks for the help.
Jeff
"swdev2" <wsanders@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:em$WLCNbIHA.1184@xxxxxxxxxxxxxxxxxxxxxxx
Hey Jeff -
1. are you using the data environment for the report ? I suggest you
don't
!
or if you must, then add in what you need to the DE, on the fly, prior
thereport generation.
2. after the first select line, if you put 'go top' or 'go bottom' ,
do
you
still get an error ?
--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.terrafox.net www.viasqlserver.net
"Jeff Grippe" <jeff@xxxxxxxxx> wrote in message
news:13r0u5c75h24c6f@xxxxxxxxxxxxxxxxxxxxx
Hello and thanks in advance for the help.
I have an program which builds a file for the report generator, calls
havereport, and returns.
It is being called from a right click menu of a form.
The code for printing (2 lines)
SELECT Inv_Print
REPORT FORM pickticket to PRINTER NOCONSOLE
The problem is that the first time this PRG is called from the
compiled
version I get a variable not found message. The problem does not
occcur
on
calls to the PRG after the first one.
Here is what I know about this problem:
1. If I change the REPORT line to include PREVIEW the code works fine
2. If I insert a BROWSE command in front of the REPORT command, it
browses
the INV_PRINT table and then prints fine.
3. If I put the BROWSE after the REPORT command, the error occurs and
I
discover that I wasn't actually pointing to the INV_PRINT table.
As I said in the subject, I hate this kind of problem. Does anybody
inany
potential solutions or debugging suggestions. BTW, if you run the code
whenthe debugger, the problem doesn't happen. It was only by sticking theBROWSE
after the REPORT command that I discovered that it was pointing at thewrong
table.
The ultimate question is why would it be pointing at the wrong table
the SELECT statement is right before the REPORT command.
.
- References:
- I Hate this kind of problem. Please Help
- From: Jeff Grippe
- Re: I Hate this kind of problem. Please Help
- From: swdev2
- Re: I Hate this kind of problem. Please Help
- From: Jeff Grippe
- Re: I Hate this kind of problem. Please Help
- From: swdev2
- I Hate this kind of problem. Please Help
- Prev by Date: Re: Access Access vai odbc
- Next by Date: Re: COPY TO TYPE DELI ERROR 202 "Invalid path or file name"
- Previous by thread: Re: I Hate this kind of problem. Please Help
- Next by thread: Re: I Hate this kind of problem. Please Help
- Index(es):
Relevant Pages
|