Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP reporter. Set page margins 2

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
621
GB
I apologise if I have asked this before.

Am designing a report under VFP9. The left and right margins are a default 1" = 25mm. Would like to reduce these; I can go into report designer, Right-click and go into Report Properties, then Page Layout | Page Setup. I can alter the radio button to change between Portrait and Landscape. However the margins, shown as 25 mm, are greyed out, so that I cannot change these.

Is there a way round this.

Thanks. Andrew
 
These settings are controlled by the printer driver. If it doesn't allow changing them then you can't.

I just checked and on my Brother color laser, the margins are adjustable down to the printer's supported margins. VFP won't let you define a report that can't possibly print on your printer.
 
Just yesterday I printed business cards and they printed wrongly positioned. I forgot to setup the printer to borderless printing in its driver settings, then the cards printed correctly positioned.

So indeed look into printer options, you surely find something to change there. In my case I printed with Word. In VFP you also have the option to set the printable area to whole page instead of printable page. Your printer may then cut off anything not in the printable page area, but calculations of margins etc. are done for the whole page and not influenced by margins due to the non printable area.

In my printer driver I can even set off the alarm about printing on the non printable area, anyway it's mostly possible to print with smaller margins than 1 inch. If not, you need another printer, no code or settings can help you against physical limitations of the printer due to his feeding mechanism etc.

Bye, Olaf.
 
I agree with the other comments re the printer driver.

Then again, are you sure you need to change the margin settings? I've never found it necessary to do that. If you want to leave some blank space around the outside of the page, just adjust the positions of the report controls accordingly. That's quite easy to do, especially if you use the alignment tools.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thank you all. Still unsure of how to proceed. It is indeed a Brother printer; the driver shows as Brother MFC-J5910DW printer.

It can be happily controlled from Word 2010 or from Excel; From Word I can set the margins to as narrow as 0.15" and that works fine. (In fact I can set them narrower than that : it complains, but can print within 1/20" of the edge).

I am in the VFP9 report designer and go into File | Page Setup | Page layout, (the screen which offers Size, Source, Orientation and Margins. The other settings on this 'Page layout' screen show Size : A4(210 x 297mm), Source : Autoselect and Orientation : Portrait.

However, the margin container is greyed out; it shows all four margins as 25 mm (One inch), and I cannot change them.

This happens whichever .frx file I am editing : on the Page Layout screen the container showing the margins is always greyed out.

I would like to reduce the margin to about half an inch, because I want to print on more of the paper.

I have looked at the printer properties (Windows | Devices and Printers) but I cannot see any setting which would prevent an application (like VFP) from altering the margins.

Andrew.
 
Don't use Foxpro to setup your printer, set the printer settings through windows.
Forget about the page setup dialog. It's just a printer independent dialog you can't set much.

Edit: To be more specific: SYS(1037) calls into this dialog, too. Before Vista you could go from there to native printer driver dialogs to make all kind of settings, but that is lost. And while SYS(1037) is a VFP sys function, the dialog you see is Windows Standard and has nothing to do with neither VFP nor your printer.

Bye, Olaf.
 
Andrew,

Did you read my post? Basically I am suggesting that you ignore the margin settings and simply position the report controls where you want them. The fact that the greyed-out margin controls are pre-set to 25 mm is irrelevant. You will still be able to move the report controls to the very edge of the paper if you want to, especially if you set the print area to "whole page".

The fact that you can set the margins in Word and Excel is also irrelevant. In those applications, the user has no direct control over the positioning of individual page elements, and so they need a way of telling the application how much space to leave at the edge of the page. That's not the case in a VFP report.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thank you both. Yes, I believe the problem is resolved. I had not realised that the margins described on the Page layout screen (25mm but greyed out) do not really apply; I shall take your advice, Olaf, and not use the Page layout dialog.

And thank you, Mike (along the same lines) I appreciate that all the control of margins is done with the .frx layout screen.

Andrew
 
Well, it's an easy mistake to make. It would have been better if the greyed-out margins were preset to 0, or better still, not present at all. But there are no doubt good reasons for doing the way it is.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top