Re: Sys(1037) on VFP9 SP2



As long as you don't have the printer environment saved in the report, after
you return from the .ShowPrinter call, then whatever printer was selected
will be where the report prints when you issue the REPORT FORM yourreport TO
PRINT command.

Note in order to be able to cancel the dialog and not print, you need to set
the .CancelError property to .t. before you try to do .ShowPrinter(). Then,
depending on the version of VFP, you can either use TRY/CATCH to trap it or
you can use the Error event of the command button that calls the
oleControl.ShowPrinter() and set a form property to tell you that an error
has occured so you don't execute the REPORT command.

--
Fred
Microsoft Visual FoxPro MVP


"Ramses Reinoso" <ramsesreinoso@xxxxxxxxxxx> wrote in message
news:%23uLco5g4IHA.4492@xxxxxxxxxxxxxxxxxxxxxxx
Thank you again,
I'm trying to survive with this OleControl, but how can you use REPORT
FORM myReport.frx TO PRINTER and at the same time use
thisform.OleControl1.ShowPrinter()

"Fred Taylor" <ftaylor@xxxxxxxx!REMOVE> wrote in message
news:OwgyIfJ4IHA.776@xxxxxxxxxxxxxxxxxxxxxxx
There are .FromPage and .ToPage properties on the OleControl, along with
others like orientation, pages, etc.. Don't know of a way to return the
printer selected though.

--
Fred
Microsoft Visual FoxPro MVP


"Ramses Reinoso" <ramsesreinoso@xxxxxxxxxxx> wrote in message
news:eugHx1E4IHA.4272@xxxxxxxxxxxxxxxxxxxxxxx
Thanks Fred for you response.
I'm jumping from VFP6 to VFP9 SP2. I got a VFP6 form with a option
group with 3 options (Preview, Printer and File) and a button with SET
PRINTER TO NAME Sys(1037) on its click event to select a printer, then
the user can print a page range and multiple copies. Now on VFP9 i
can't use sys(1037) because it doesn't return a printer name.
I did what you suggest me, but how can i get the same effect as REPORT
FORM (lcReportName) TO PRINTER NOCONSOLE RANGE nPageFrom, nPageTo. I
mean, thisform.OleControl1.ShowPrinter() does not return a printer name,
either.

Thanks,
Ramses.

"Fred Taylor" <ftaylor@xxxxxxxx!REMOVE> wrote in message
news:egl3mmh3IHA.5088@xxxxxxxxxxxxxxxxxxxxxxx
What's the issue? Maybe you can use the ComonDialog print box instead?

Drop a CommonDialog ActiveX control on a form and have a command button
that shows the Printer Dialog using thisform.OleControl1.ShowPrinter().

--
Fred
Microsoft Visual FoxPro MVP


"Ramses Reinoso" <ramsesreinoso@xxxxxxxxxxx> wrote in message
news:uOuCUjg3IHA.3544@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,
Have anybody found a walkaround for the sys(1037) issue. I mean, is
there a way to select a printer and page setup on the same dialog box
(as VFP6 did)?
I know Cathy Pountney have opened a 'ticket' at MS, but it's reported
as closed.

Thanks,
Ramses.











.