Report from code - Delphi 10.2

Good morning!

I'm trying to generate a report from code (Pascal), I have the following page setup.
    {CONFIGURATION OF LABEL - SIZE}
    PaperHeight := 30;  
    PaperWidht := 40;  

    {CONFIGURATION OF LABEL - MARGIN}
    MarginLeft := 2; {2 = 0,2 | 2.5 = 0,25}
    MarginRight := 2; {2 = 0,2 | 2.5 = 0,25}
    MarginBottom := 2; {2 = 0,2 | 2.5 = 0,25}
    MarginTop := 2; {2 = 0,2 | 2.5 = 0,25}

So far so good, but when I add a MemoView its widht is larger than the page, how is that possible?

Are they different measures?

Example:
PaperWidth = 40.000000000000000000
PaperHeight = 30.000000000000000000

MemoWidth = 136.062992125984300000
MemoHeight = 18.897650000000000000

Comments

  • gpigpi
    edited 12:04AM
    Objects??? coordinates and sizes are set in pixels. Since the ?«Left,?» ?«Top,?» ?«Width,?» and ?«Height?» properties of all objects have the ?«Extended?» type, you can point out non-integer values. The following constants are defined for converting pixels into centimeters and inches:


    fr01cm = 3.77953;
    fr1cm = 37.7953;
    fr01in = 9.6;
    fr1in = 96;

    For example, a band???s height equal to 5 mm can be set as follows:

    Band.Height := fr01cm * 5;
    Band.Height := fr1cm * 0.5;

    Paper's height and width are set in mms

  • edited 12:04AM
    gpi wrote: »
    Objects??? coordinates and sizes are set in pixels. Since the ?«Left,?» ?«Top,?» ?«Width,?» and ?«Height?» properties of all objects have the ?«Extended?» type, you can point out non-integer values. The following constants are defined for converting pixels into centimeters and inches:


    fr01cm = 3.77953;
    fr1cm = 37.7953;
    fr01in = 9.6;
    fr1in = 96;

    For example, a band???s height equal to 5 mm can be set as follows:

    Band.Height := fr01cm * 5;
    Band.Height := fr1cm * 0.5;

    Paper's height and width are set in mms

    Thanks!

    Solved!

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.