SectionReport appears garbled #2

Posted by: ilia on 10 July 2018, 1:55 am EST

  • Posted 10 July 2018, 1:55 am EST

    The sample attached.

    SectionReportApplication2.zip
  • Replied 10 July 2018, 2:35 am EST

    Hello,

    As a workaround, you can set the "WrapMode" property of "Label" to "No Wrap".

    Hope it helps.

    Thanks,
    Mohit
  • Replied 10 July 2018, 3:29 am EST

    It helps in this case, but does not in another.
  • Replied 11 July 2018, 10:51 am EST

    Hello,

    This is the design behavior of RTL text. You can see the observe the difference by zooming the viewer. Also, Alignment of RTL text in the exported file is correct.

    thanks,
    Mohit
  • Replied 12 July 2018, 1:01 am EST

    First, the text is not RTL-text, but it is aligned to the right.
    Secondly, it works fine in AR2 COM.
    Thirdly, I do not have the privilege to tell all our customers that this is by design.
    I hope this is not so difficult to fix this behavior.
    P.S. Distortion only in the first line.
  • Replied 12 July 2018, 4:52 am EST

    Hello,

    I have forwarded the request to our development team(ID 260669) and will inform you once I get any information from them.

    Thanks,
    Mohit
  • Replied 12 July 2018, 7:05 am EST

    Hello,

    As per developer comment, the results depend on DPI of system. As WinViewer shows the text via the common System.Drawing API(GDI+), however, AR2 COM uses old GDI. Hence, this is the design behavior of the AR.

    Thanks,
    Mohit
  • Replied 12 July 2018, 12:39 pm EST

    GDI+ works fine in the System.Windows.Forms.Form. It is AR12 issue.
  • Replied 13 July 2018, 5:44 am EST

    Hello Ilia,

    Yes, this is the issue of AR12. However, this is treated as the limitation of AR.

    Sorry for the inconvenience caused.

    Thanks,
    Mohit

  • Replied 13 July 2018, 6:32 am EST

    You can fix this limitation.
  • Replied 16 July 2018, 5:52 am EST

    Hello Ilia,

    I have forwarded your request to our developers' team.

    Thanks,
  • Replied 1 August 2018, 7:53 am EST

    Hello Ilia,

    Could you please try after setting the "CharacterSpacing" to "0.1"

    Thanks
  • Replied 1 August 2018, 11:43 pm EST

    After setting "CharacterSpacing" to "0.0001" of the point, it works perfectly vertically, but the text is cropped horizontally (calculated using "CharacterSpacing" 1).
  • Replied 2 August 2018, 6:23 am EST

    Hello,

    Could you please check it again after deleting the textbox and drag and drop textboxes again?

    Thanks
  • Replied 2 August 2018, 7:24 am EST

    Sample attached.
    In my sample the text is not cropped horizontally when "CharacterSpacing" is setting to "0".
    SectionReportApplication2.zip
  • Replied 2 August 2018, 7:52 am EST

    Hello,

    As a workaround, could you please set "WrapMode" property of "Total 2" label to "No Wrap"

    Thanks,
  • Replied 2 August 2018, 9:17 am EST

    Replied 10 July 2018, 2:35 am EST
    Hello,

    As a workaround, you can set the "WrapMode" property of "Label" to "No Wrap".

    Hope it helps.

    Thanks,
    Mohit

    Replied 10 July 2018, 3:29 am EST
    It helps in this case, but does not in another.
    Ilia
  • Replied 3 August 2018, 5:06 am EST

    Hello Ilia,

    Sorry for the confusion.

    I have forwarded your request to our developers' team.

    Thanks
  • Replied 6 August 2018, 7:39 am EST

    Hello Ilia,

    CharacterSpacing may lead to the wordwrap because word's width is increased, but it is expected behavior. for the small values like '0.001', the length of whole string may grow to 1px and you need to set the control width with 1mm precision to see the different wordwraps in comparing of '0.001' and '0' values of CharacterSpacing property.

    Thanks,
  • Replied 8 August 2018, 5:40 am EST

    Replied 1 August 2018, 7:53 am EST

    "Hello Ilia,

    Could you please try after setting the "CharacterSpacing" to "0.1"

    Thanks"

    Because the CharacterSpacing may lead to the wordwrap because word's width is increased, your workaround does not help in cases with small text.
    To view text in my sample properly i need to increase the width by 0.08 inches (2 mm), which is too much for aligning the text.
  • Replied 8 August 2018, 6:40 am EST

    Hello Ilia,

    I have forwarded your issue to our developers' team.

    Thanks
  • Replied 9 August 2018, 5:09 am EST

    Hello Ilia ,

    please check the following code on your machine:

    public Form1()
    {
    InitializeComponent();
    }

    protected override void OnPaint(PaintEventArgs e)
    {
    var format = new StringFormat(StringFormat.GenericTypographic);
    format.Alignment = StringAlignment.Far;
    e.Graphics.DrawString("'WM'", new Font("Arial", 32, FontStyle.Underline), SystemBrushes.ControlText, new RectangleF(0, 0, 180, 90), format);
    format.Alignment = StringAlignment.Near;
    e.Graphics.DrawString("'WM'", new Font("Arial", 32, FontStyle.Underline), SystemBrushes.ControlText, new RectangleF(182, 0, 180, 90), format);

    base.OnPaint(e);
    }


    ActiveReports uses the same API in WinViewer control.

    Thanks,
    Sergey Romanov.
  • Replied 9 August 2018, 9:11 am EST

    How do you do Sergey,
    Your code works fine in Form, but WinViewer control looks garbled.
  • Replied 10 August 2018, 3:23 am EST

    Hello Ilia ,

    unfortunately, the issue is not reproducible on my machine in both WinForms and ActiveReports projects. here is the original sample of code from developers:

    public Form1()
    {
    InitializeComponent();
    }

    protected override void OnPaint(PaintEventArgs e)
    {
    var format = new StringFormat(StringFormat.GenericTypographic);
    format.Alignment = StringAlignment.Far;
    e.Graphics.DrawString("\"WrapMode\" ", new Font("Arial", 10, FontStyle.Underline), SystemBrushes.ControlText, new RectangleF(0, 0, 90, 90), format);
    format.Alignment = StringAlignment.Near;
    e.Graphics.DrawString("\"WrapMode\" ", new Font("Arial", 10, FontStyle.Underline), SystemBrushes.ControlText, new RectangleF(90, 0, 80, 90), format);

    base.OnPaint(e);
    }




    Thanks,
    Sergey Romanov.
  • Replied 16 August 2018, 1:37 pm EST

    Maybe, MicroSoft will fix this issue within the next six months.
    Workaround: Add "\0" in the end of string. ("\"WrapMode\" \0")
  • Replied 27 August 2018, 2:21 am EST

    Ilia ,

    Thank you for the workaround.
Need extra support?

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

Learn More

Forum Channels