>
> >One client has a landscape report which occasionally (about 25% of the
> time) prints in Portrait mode, cutting off the right few columns. The
> report is called from a button, using the "Report form xxx to printer
> noconsole prompt". None of her other landscape-mode reports are doing
> this, although they are called from the same button.
> >
> >I've opened the report on her computer and re-entered the page-setup and
> printer data. It might have improved matters slightly.
> >
> >Any suggestions welcome
> >TIA
> >Barbara Paltiel
>
Barbara,
Here's what I see when I open a report as a .dbf (USE reportname.FRX),
and open the EXPR memo of the first record. As far as your problem is
concerned I think it is the Alpha-Omega of the report writer setting in
Windows. (BTW everything that I explain here assumes HP like printers).
DRIVER=WINSPOOL
DEVICE=hp 5l
OUTPUT=LPT1:
ORIENTATION=1
PAPERSIZE=9
COPIES=1
DEFAULTSOURCE=1
PRINTQUALITY=0
YRESOLUTION=300
TTOPTION=2
When at run-time a report is launched, the settings contained in this
field overwrite the windows settings. How much control the PROMPT
clause gives you over this I frankly do not know.
You can change these settings (or erase them if you want the current
settings of Windows), but you have to hack the .frx, so this is not End
User oriented (one could argue that it is not oriented at all :-)).
Now if you empty the TAG and TAG2 fields and the report is part of a
project, and you recompile it, then your hacking will take effect.
Careful, if you load the report back into the designer, you modify
something (even if it is not related to the printer settings) and save
your work, your hacking will be overwritten again, the report writer
assumes rather humoristically that you will run the report in exactly
the same circumstances than when you save the report, so it just sets
the settings of that moment into the field above.
To recompile my projects I have this little program that BUILDS ... .
Before this I have a loop that empties out the Expr, Tag,Tag2 fields of
the first records of all the .FRXs. I keep the YRESOLUTION= 300
(because this forces your printer in low resolutions which is great for
speed!), and if I want the report to print in landscape, I set the
ORIENTATION=1.
Those settings that are absent at compile time can be set at run time.
For example, if you want your user to be able to fax a report i.o.
printing it, you leave out the DRIVER, DEVICE and OUTPUT statement from
the EXPR field, and you SET PRINTER TO, or use GETPRINTER or sys(1037),
before you REPORT FORM. Other Windows settings can be set using API
routines, but I've other thing to do ...
All this works of course for reports that are integrated into a project,
and have not to be changed at run time. To allow for that functionality
my suggestion would be (as Dave says) to use another tool... The Report
Writer is definitely not an End User tool, at this point in time.
HTH,
Marc.
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.