Label Text Alignment changes with content

Posted by: gphillips on 7 May 2018, 4:00 pm EST

    • Post Options:
    • Link

    Posted 7 May 2018, 4:00 pm EST - Updated 30 September 2022, 6:19 pm EST

    I have an odd problem. I am using AR 12 (just converted from AR 6) and I am experiencing a problem with labels.

    I have a section report with a header that has multiple column labels. I am using Arial Narrow font at 9 pt. All the other parameters of the two labels are identical (except the location), in fact I copied one label and pasted it and changed the text. One label has it’s text property set to “Phone” and the other has it’s text property set to “GL Acct”. The result is that the Phone label’s text is visibly lower in it’s box than the GL Acct text. It is also the same when the report is printed or previewed!

    The designer code for the two fields is as follows:

       '
        'Label4
        '
        Me.Label4.Height = 0.188!
        Me.Label4.HyperLink = Nothing
        Me.Label4.Left = 4.583!
        Me.Label4.Name = "Label4"
        Me.Label4.Style = "font-family: Arial\000020Narrow; font-size: 9pt; text-align: left; ddo-char-set: " &
    "0"
        Me.Label4.Text = "Phone"
        Me.Label4.Top = 0.567!
        Me.Label4.Width = 0.74!
        '
        'Label7
        '
        Me.Label7.Height = 0.188!
        Me.Label7.HyperLink = Nothing
        Me.Label7.Left = 5.431!
        Me.Label7.Name = "Label7"
        Me.Label7.Style = "font-family: Arial\000020Narrow; font-size: 9pt; text-align: left; ddo-char-set: " &
    "0"
        Me.Label7.Text = "GL Acct"
        Me.Label7.Top = 0.567!
        Me.Label7.Width = 0.74!
    

    Screen shots from the designer and from Preview are attached.

    Box boxes have the default vertical alignment which is Top. Trying to change the vertical alignment to Middle on the GL Acct label makes it lower than the Phone box.

    Any assistance would be appreciated.

  • Posted 7 May 2018, 4:05 pm EST

    PS. The problem also occurs in the Occupant label. The 2nd Phone and GL Acct labels were omitted from the preview.

  • Posted 8 May 2018, 2:59 am EST

    I’m sorry I was unable to reproduce the issue you’ve pointed out. The text were aligned correctly with the settings you mentioned. I have attached a screen shot of the output and even the report file for your reference. I added backcolor and borders to the Labels for better observation. Kindly check if you can reproduce the issue with this report.

    It would be helpful for me, if you could send across your report or application so I can reproduce the behavior and proceed further. Please also mention your system details and the exact version of AR 12 you’re using.

    TextAlignment.zip

  • Posted 8 May 2018, 1:59 pm EST

    Thank you for the quick reply. Would it make a difference if the report is code-based rather than RPX? I will attempt to put together a project to demonstrate the issue and post it.

  • Posted 9 May 2018, 3:02 am EST - Updated 30 September 2022, 6:19 pm EST

    Although there is no difference in rpx and code-based reports in terms of rendering, I tried with a code-based report as well but still couldn’t reproduce the issue. I have attached the report and the output as seen in the Win Viewer.

    TextAlignment.zipSectionReport2.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels