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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report needs a larger left margin

Status
Not open for further replies.

SitesMasstec

Programmer
Sep 26, 2010
508
Brasil
Hello colleagues!

I have a report that has dozens of pages like this bellow (page 9):
FichaTecnica_gavdfv.jpg


Well, a user told me he wants to bind all these dozens of pages (with the same layout) in a book, but the left margin is too small...[sad]

Will I have to redesign the report, changing the width of many fields and then moving all them to the right side of the report or is there an easier way to accomplish this task? For example, is it possible to give the user the option to decrease all fields to 90% of their original sizes, so there will be more blank spaces in the margins?


Thank you,
SitesMasstec
 
Many printer drivers offer scaling as a feature, so this could be solved without any change of the FRX.
PDFcreator has that feature, for example. You could always use that, first create a PDF with 90% or 80% scaling and finally print that.

Chriss
 
For another example of the scaling feature, if your user has an HP LaserJet or compatible, tell them to go its Properties -> General tab -> Preferences -> Effects. Then select "% of actual size", and specify a number below 100 (say, 90).

Going further, if they first copy the printer driver and then make the above change in the copy, then each time they want to print that particular report, they can select the copied driver from your GETPRINTER dialogue.

So no programming on your part, and no changes to the report.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
The means you have within the report designer are the page layout tab of the report properties. There you can set a left margin, if you increqase that, the report design area will shrink, instead of showing the margin, which will cut off the rightmopst elements.

You could select all elements with CTRL+A and then reduce their width with SHIFT+leftarrow. It wil reduce every report controls width, but not scale them, so you'll have gaps and so that's not the same as scling. There's also no settting you'd need for books printing to swap the margin from left to right for even/odd pages. Something like that could well be available i the page setup of the printer driver. So in the end the printer driver options are your best friend here. And if the options for the printer of that customer doesn't offer such options, the best bet is a PDF printer could have them.

Chriss
 
Looking at your screen shot, it should be possible to squash the columns together a bit, to create space for a left margin. The ingredient column in particular looks like it might be wider than necessary. Of course, that would mean more work on your part - but not much more. I suppose that whether it's worth the effort would depend on how valuable the customer is.

By the way, that torta de chocolate looks most tempting.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike and Chriss:

I tried your advices. As not any user has a PDFCreator, I tryed the Microsoft PDF driver, which is part of Windows 10, but it has not have the scale function.

Then I tried Properties -> General tab -> Preferences ->... of my Brother printer, and choose 85% of the report original size, but this driver does not let the user center (or better, move to right side) the content of the report:
PrefBrother_cmawaa.jpg


So, I will make some changes in the report layout, as Mike suggested.


Thank you,
SitesMasstec
 
not any user has a PDFCreator

Well, you could make it part of the installation, or any other pdf printer driver that could even have a better feature of "inner margin" or book printing, with automatically alternating sides. And then print the final pdf on any printer again.

I admit that's even more work to make that change, but it's the only way I know to not need to change reports and still provide such a feature of book printing in a universally usable way.

Chriss
 
At last I made what I wished to avoid: change the report layout.

FichaTecnica2_l6jwuh.jpg


I had thought maybe there was some trick in VFP 9 to make a scaling of the report in the same physical paper sheet, but it depends on printer drives or installing a PDF generator, as Chriss and Mike said.

Probably my customers won't manage these tasks accordingly, so I changed the report layout, as Mike had advised too. I also made some minor optimization in the report.

But you may think, as I thought: "If some user needs to bind the dozens of sheets in a real book?" (which needs larger margins with alternating sides, as Chriss mentioned before). In the event this case occur, I will do the following:
1) Open the form, Select all, and center the contents of the form
2) Go printing as Chriss advised

Thank you,
SitesMasstec
 
I find pdf tools, mainly on linux, that manage the book printing by creating a pdf with the two pagelayouts needed for a book and finally printing the pdf, so it's not an unusual idea. Well, it's also true I found this by searching for book printing with alternating page layouts - you find what you search. But it's assuring these solutions exist and are a feasable way.

Chriss
 
Yes, Chriss, I understood. None of my users asked for the application to print in book format (with alternating margin widths).

Some use to bind the sheets in a folder, and I think this new layout will make it easier to read the contents of the report.

Of course, that, if I (me, a technician) need the report in a book format, I will install PDFCreator, as you advised.


Thank you,
SitesMasstec
 
PDFCreator is just something I have installed, it's not necessarily having the best features for printing books or booklets.

In the end I think Donald Knuth TeX and the further developed LaTex have the best options for printing books, much more advanced, it's just not at all feasable to turn VFP reports into TeX/LaTeX code for printing.
The simplest solutions I saw were actually hardware solutions, real office printers with not only many different trays for feeding in multiple types of sheets and sorts of papers, but also many output trays. Their drivers usually have many more options, also for scaling and shifting odd/even pages or duplex printing not only two pages - one on each side, but 4 pages in half size so folding them in the middle creates a book when you just fold the whole batch of pages in the middle, which means you don't need lamination of the spine of a book.

Chriss
 
SitesMasstec, in my opinion - for what it's worth - your new layout looks better than the original, regardless of the issue with the left margin. It never does any harm to have a little extra white space around the body of the report, and you are clearly not losing anything by making the columns a little bit narrower.

I would guess that the whole redesign didn't take you much more than a few minutes. So definitely a good solution.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Well, Mike, believe me, it took me between 2 to 3 hours to accomplish the changes in the report, because, in addition to moving the fields, I decreased the width of 40 fields (columns 4 and 5).

I had to change the width of these 40 fields in columns 3 and 4, one by one (no multiple selection available for this task in report, differently if the width of these fields were to be made in a Form[sad]).

I cannot change the size of fields in the last column (6th): I remember that in 1985, when I began programming, a lot of spaces were needed to display values, as 1 kg (one kilogram) of suggar used x,xxx.xx, so back in time, for 10 kg it would use xx,xxx.xx! Who knows about tomorrow? [dazed]

Also, I made other minor changes in the report.


Thank you,
SitesMasstec
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top