Problems with Mirror Margins in Landscape Reports

PolomintPolomint Australia
edited March 2018 in FastReport VCL
OK I promised to raise this matter a while ago:

Curious Problem with Margins in Inherited Reports

There has not been a lot of progress on the original issue, so I'm raising the priority on this one. I am also raising it here in v6.0 space because the issue affects v5.6.x and also v6.0.x code.

Has anyone solved the problem of creating a "gutter" on Landscape Reports printed with Verical Duplexing?

All my testing seems to show that the "Mirror Margins" setting only operates in the "horizontal plane". That is, regardless of the settings of Portrait / Landscape and Duplex if the Left and Right Margins are different and Mirror Margins is set, there will be a "gutter" on the left-hand side of odd numbered pages and the right-hand side of even-numbered pages.

Attached PDF files (in the Zipped Attachment) show this clearly.

Unfortunately "Export to PDF" obscures the Duplex operation - you really have to send the reports to printer to see that:
- "Simplex" setting causes pages to print single-sided
- "Horizontal" setting causes double-sided printing and the tops of the odd- and even-numbered pages are on the same edge of the physical piece of paper
- "Vertical" / "None" setting causes double-sided printing and the tops of the odd- and even-numbered pages are on opposite edges of the physical piece of paper

Why is this important?

I've included a PDFed mock-up of both Portrait and Landscape reports (CR01115) showing that the "gutter" on double-sided printed pages is important for documents which will be put into a binder.

FastReport happily provides the settings needed to create the "ideal" Portrait report, and we have a dozen or so such reports in our main Application.

There appear however to be no setting(s) to create the "ideal" Landscape report.

If we use Horizontal Duplex we can get the Bottom Margins lined up for binding, but the folder needs to be rotated for every page(!) to read the report from beginning to end. If we use Vertical / None Duplex the margins don't line up so we have to waste space on the top of even-numbered pages and bottom of odd-numbered pages to create the necessary "gutter" for binding.

I suspect that we need a new setting to flag "VerticalMirrorMargin". It is possible that other users may want both vertical and horizontal mirror margins.

The zipped attachment includes the code for running these model reports. Ignore the bits of it that test the Preview Form buttons, the important settings are the Landscape / Portrait Orientation toggle, Mirror Margins toggle and Duplex combo-box.

Any suggestions / corrections / coaching will be welcome [img]style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> Cheers, Paul[/img]

Comments

  • PolomintPolomint Australia
    edited 2:02PM
    OK. First pass over the Source Code for FastReport v5.6.8 suggests this a little more complicated than I thought.

    Of all the modules it looks like the key one is frxPreviewPages.pas which refers to MirrorMargins in three places.

    The DrawPage procedure tests Page.MirrorMargins and if Index is Odd, it just swaps Left and Right Margins. **

    The Export function tests Page.MirrorMargins and if Index is Odd Page.Left is converted from Page.RightMargin otherwise Page.Left is converted from Page.LeftMargin.

    The ObjectOver procedure tests Page.MirrorMargins and if Index is Odd OffsetX is converted from Page.RightMargin otherwise OffsetX is converted from Page.LeftMargin.

    The tests in the above code make no consideration of page orientation, duplex setting (or even whether Left and Right Margins are different).

    Discussion:

    IMHO (or at least in the design of our Apps) there is no need for both "horizontal" and "vertical" MirrorMargins, so we could get by with the existing property to turn the behaviour on, and just modify its action by testing another existing property. There is a small possibility that in the future we might want "horizontal" mirroring on a Landscape report (binding on the shorter edge, so testing Orientation property is probably not the way to go.

    I think that testing Duplex property makes the most sense:
    - if Duplex is "None" we should disable MirrorMargin functionality (no point if the pages are printed single-sided)
    - if Duplex is "Horizontal" we just use existing behaviour
    - if Duplex is "Vertical" we should clone existing behaviour but substituting Top for Left and Bottom for Right
    - if Duplex is "Simplex" I haven't worked out what we should do!


    Does anyone else have experience of this? Are there alternative views / considerations?

    Is this something that is worthy of a request for enhancement by the FR Support Team, or am I alone in the wilderness with a totally unique problem?

    Cheers, Paul
  • PolomintPolomint Australia
    edited July 2018
    No further forward in v6.1.6 sadly. [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> We are working around this "limitation" by exporting all landscape reports to pdf, and using Adobe Acrobat's (correctly working) duplex / mirror margin functionality. Hardly ideal, but it works![/img]>

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.