AR15 - Label control Alignment/Wrapping Issues

Posted by: rkuehn on 18 May 2021, 7:46 am EST

  • Posted 18 May 2021, 7:46 am EST

    I’ve upgraded to AR15. I’m using VS 2019 on Windows 10 Pro and targeting .NET Framework 4.7.2 in my solution. My report designers are based on classes that are ultimately based on a SectionReport object.

    I’m adding Label controls to my report designers both at design time and at run time. The Label controls I created at design time look good and show proper alignment/wrapping of text. When I run the project and create the PDF, both the Label controls created at design time and the Label controls created at run time demonstrate alignment and wrapping issues. The text in those Label controls in the PDF appears shifted to the right and the text pushes off the right edge of the Label control.

    To make sure it wasn’t something buried in my solution, I created a test program that contains 1 report designer with just 1 Label control created at design time and 1 Label control created at run time. The PDF created by this test program demonstrates the same issue for both Label controls. I attached a zip file of my test program to this post, which contains both the code and the resulting PDF created.

    Please help me understand what I’m doing wrong.

    TestStyleSheets.zip

  • Posted 18 May 2021, 4:56 pm EST

    Hello,

    Can you please check with the latest version of AR15 i.e AR151.0.2. I am not able to reproduce the issue with same. Please refer to the attached pdf.

    Thanks,

    Mohit

    TestStyleSheets-20210519-11.22.38.zip

  • Posted 19 May 2021, 8:34 am EST

    @mohitg

    I can confirm that I’m using AR version 15.1.2.0.

    The font I’m using is Frutiger LT 45 Light, 9pt, style=Bold. What font are you using in your sample? Could it be that the font is not being handled properly?

  • Posted 20 May 2021, 4:45 am EST

    Hello,

    I have downloaded the font from the following link:

    and set the label font to “font-family: Frutiger LT; font-size: 9pt; font-weight: bold; text-align: center; vertical-align: top”

    and export the report to PDF. However issue does not occur.

    Please share if I am missing something.

    Thanks,

    Mohit

  • Posted 20 May 2021, 9:45 am EST

    @mohit

    That’s the difference. As you can see in the test program I attached to the first post, I have (1) my SectionReport StyleSheet property set up at design time, (2) my control with the Font property set to “Frutiger LT 45 Light, 9pt, style=Bold”, and (3) the Style property set to “text-align: center; vertical-align: top”. When I switch my Style property to “font-family: Frutiger LT; font-size: 9pt; font-weight: bold; text-align: center; vertical-align: top” as you show above, the text appears to use proper alignment/wrapping.

    It seems to me that those 2 SectionReport states should yield the same result. Why don’t they? It appears that setting the SectionReport StyleSheet property isn’t actually affecting the fields on the report. Please help me understand.

  • Posted 20 May 2021, 2:30 pm EST - Updated 30 September 2022, 7:42 am EST

    Hello,

    I had set the same font and style but no issue occur at my end. Please find the attached image.

    Thanks,

    Mohit

  • Posted 24 May 2021, 8:31 am EST

    @mohitg

    I understand that your test program doesn’t show the issue. My test program does.

    Can you please just look at and run the test program I attached to the first post? It illustrates the issue. I just need you to review it and tell me what I need to change.

  • Posted 24 May 2021, 3:31 pm EST

    Hello,

    Yes, I had checked with your test program which is attached in your first post. You can see the attached image in my previous reply.

    Thanks,

    Mohit

  • Posted 26 May 2021, 6:17 am EST

    @mohitg

    I need help. This test program shows the error on my machine. If I put the font information in the Style property as you showed in your test program, then the issue goes away. Does that mean I have to do that with all my thousands of controls? That seems illogical and that’s not how it worked in the past.

    We’ve spent a week going back and forth on this case. I can’t continue this way, so I need someone to get on a call and help me resolve this issue during daylight hours ET. What do I need to do to get this assistance?

  • Posted 26 May 2021, 4:05 pm EST

    Hello,

    I did not change anything in the sample. What I did in second step:

    1: Download the “Frutiger LT 45 Light” font from the following link:

    https://www.download-free-fonts.com/details/71662/frutiger-lt-45-light

    2: Download and extract the sample from the Initial post.

    3: Restore the packages in the sample.

    4: Run the sample

    5: Open the attached PDF file and found alignment is properly fine,

    Have you seen the image in the following reply. You can see the Font property is same as you described

    https://www.grapecity.com/forums/ar-dev/ar15---label-control-align#helloi-had-set-the-same-fo

    I can’t continue this way, so I need someone to get on a call and help me resolve this issue during daylight hours ET. What do I need to do to get this assistance

    You can call at the “Tel: 1.800.858.2739 | 412.681.4343” to get the assistance.

    Thanks,

    Mohit

Need extra support?

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

Learn More

Forum Channels