On 20 Apr 01, Brian.Searle@indsys.ge.com said:
> Can anyone tell me if it is possible to maximize the print preview
> automatically?
Yes it is possible, but definitely kludgy:
keyboard "{Ctrl+F10}"
report form myreport preview
Make sure that the report cursor has at least one record, otherwise the
maximize will occur to the calling form instead of the report preview
window.
Paul McNett
Software Consultant
Hollister, CA USA
Can anyone tell me if it is possible to maximize the print preview
automatically?
I was hoping for something like:
Report Form myform Preview Maximize
but I can't find much information on the preview option anywhere.
Brian Searle
brian.searle@indsys.ge.com
I have a function called repwindow (see below). To use it, do like so:
=repwindow(.t.)
REPORT FORM myReport PREVIEW WINDOW repwindow TO PRINTER PROMPT
=repwindow(.f.)
FUNCTION repwindow
PARAMETERS tDefine
LOCAL nWidth, nHeight
IF tDefine
nWidth =
_SCREEN.WIDTH/FONTMETRIC(6,_SCREEN.FONTNAME,_SCREEN.FONTSIZE)
nHeight =
_SCREEN.HEIGHT/FONTMETRIC(1,_SCREEN.FONTNAME,_SCREEN.FONTSIZE)-2
DEFINE WINDOW repwindow AT 0,0 SIZE nHeight,nWidth SYSTEM ZOOM CLOSE
FLOAT ;
TITLE "Report Preview" FONT
_SCREEN.FONTNAME,_SCREEN.FONTSIZE NAME repwindow
ELSE
RELEASE WINDOW repwindow
ENDIF
-----Original Message-----
From: Brian.Searle@indsys.ge.com [mailto:Brian.Searle@indsys.ge.com]
Sent: Friday, April 20, 2001 1:01 PM
To: Multiple recipients of ProFox
Subject: VFP6 Report Preview Maximize
Can anyone tell me if it is possible to maximize the print preview
automatically?
I was hoping for something like:
Report Form myform Preview Maximize
but I can't find much information on the preview option anywhere.
Brian Searle
brian.searle@indsys.ge.com
Author: Brian.Searle@indsys.ge.com
Posted: 2001-04-20 13:46:00 Link
This list is wonderful. 30 minutes ago, I was scrambling to find a solution
and then I received 3 variations before I even saw my question hit the list.
Thanks Paul, David, Jerry and Randy. I appreciate the quick responses.
Brian Searle
brian.searle@indsys.ge.com
> -----Original Message-----
> From: Randy S. Jean [mailto:rjean@ogse.com]
> Sent: Friday, April 20, 2001 2:15 PM
> To: Multiple recipients of ProFox
> Subject: RE: VFP6 Report Preview Maximize
>
>
> I have a function called repwindow (see below). To use it,
> do like so:
-snipped
Create yourself a class based on a form
add a method to the form
.reportpreview
put the following code in the method
oPrintForm.WindowState = 2
oPrintForm.Visible = .t.
report form (thisform.reportname) preview window (oPrintForm.Name)
oPrintForm.visible = .f.
then run your reports like so
oPrintForm.reportname="userdata"
oPrintForm.reportpreview
Just instantiate oPrintForm at the start of you app.
This eliminates a couple other problems with the print preview toolbar also.
Mr. Jerry Cotton, MCP
<mailto:cottonjp@2mawcp.usmc.mil>
(252)466-4854 fax (252)466-4806 DSN-582
> -----Original Message-----
> From: Brian.Searle@indsys.ge.com [mailto:Brian.Searle@indsys.ge.com]
> Sent: Friday, April 20, 2001 2:01 PM
> To: Multiple recipients of ProFox
> Subject: VFP6 Report Preview Maximize
>
>
> Can anyone tell me if it is possible to maximize the print preview
> automatically?
>
> I was hoping for something like:
>
> Report Form myform Preview Maximize
>
> but I can't find much information on the preview option anywhere.
>
> Brian Searle
> brian.searle@indsys.ge.com
>
>
>
Oh my, one I might actually know the answer to!!?
keyboard '{CTRL-F10}'
report form myform preview
David Ramsey
>Can anyone tell me if it is possible to maximize the print preview
>automatically?
Hi Randy
There are several ways. Here's yet another one.
local lcReportName, ReportForm
lcReportname = ?
_screen.lockscreen = .T.
reportform=create('form')
reportform.caption=lcReportName + ' - Preview'
report form (lcReportName) preview nowait window (reportform.name) name orep
zoom window (reportform.caption) max
_screen.lockscreen = .F.
-Anders
----- Original Message -----
From: "Randy S. Jean" <rjean@ogse.com>
To: "Multiple recipients of ProFox" <profox@leafe.com>
Sent: Friday, April 20, 2001 8:14 PM
Subject: RE: VFP6 Report Preview Maximize
> I have a function called repwindow (see below). To use it, do like so:
>
> =repwindow(.t.)
> REPORT FORM myReport PREVIEW WINDOW repwindow TO PRINTER PROMPT
> =repwindow(.f.)
>
>
>
> FUNCTION repwindow
> PARAMETERS tDefine
>
> LOCAL nWidth, nHeight
>
> IF tDefine
> nWidth =
> _SCREEN.WIDTH/FONTMETRIC(6,_SCREEN.FONTNAME,_SCREEN.FONTSIZE)
> nHeight =
> _SCREEN.HEIGHT/FONTMETRIC(1,_SCREEN.FONTNAME,_SCREEN.FONTSIZE)-2
> DEFINE WINDOW repwindow AT 0,0 SIZE nHeight,nWidth SYSTEM ZOOM CLOSE
> FLOAT ;
> TITLE "Report Preview" FONT
> _SCREEN.FONTNAME,_SCREEN.FONTSIZE NAME repwindow
> ELSE
> RELEASE WINDOW repwindow
> ENDIF
>
> -----Original Message-----
> From: Brian.Searle@indsys.ge.com [mailto:Brian.Searle@indsys.ge.com]
> Sent: Friday, April 20, 2001 1:01 PM
> To: Multiple recipients of ProFox
> Subject: VFP6 Report Preview Maximize
>
>
> Can anyone tell me if it is possible to maximize the print preview
> automatically?
>
> I was hoping for something like:
>
> Report Form myform Preview Maximize
>
> but I can't find much information on the preview option anywhere.
>
> Brian Searle
> brian.searle@indsys.ge.com
>
>
>
>
At 01:14 PM 4/20/2001, you wrote:
>I have a function called repwindow (see below). etc.......
Thanks to Brian Searle for asking the question that I had forgotten I
needed to ask, and to Randy Jean for the eloquent answer that's now in use
in my application.
Randy Bosma
Hello Foxperts,
Back a long time ago my application previewed it's reports in the VFP
standard window with the VFP standard title:
"Report Designer - someReport.frx - Page #"
Thanks to Randy Jean and his repwindow() function, my previews are always
full screen and have a less misleading title:
"My Application - Report Preview"
There's one feature of the old VFP way that I would like to add back to the
title bar of the preview window - the Page number. Has anyone found a way
to emulate this feature?
TIA,
Randy Bosma
You could add a new function to
your application, somethig like this:
Function SetTitleBar
parameter nPageNumber
_screen.caption="Page: "+transform(nPageNumber)
*or, if you use a Form for your preview:
*oObjPreviewForm.Caption="Page: "+transform(nPageNumber)
return ""
Now, in your report, add a new field where,
as expression, specify:
SetTitleBar(_PageNo)
Ernest M.
Torino - Italy
----- Original Message -----
From: "R. Bosma" <mannager@safeplace.net>
To: "Multiple recipients of ProFox" <profox@leafe.com>
Sent: Wednesday, May 16, 2001 5:12 AM
Subject: VFP6 Report Preview Maximize
> Hello Foxperts,
>
> Back a long time ago my application previewed it's reports in the VFP
> standard window with the VFP standard title:
> "Report Designer - someReport.frx - Page #"
>
> Thanks to Randy Jean and his repwindow() function, my previews are always
> full screen and have a less misleading title:
> "My Application - Report Preview"
>
> There's one feature of the old VFP way that I would like to add back to
the
> title bar of the preview window - the Page number. Has anyone found a way
> to emulate this feature?
>
> TIA,
> Randy Bosma
>
>
>
>
>