SectionReport appears garbled #2

Posted by: ilia on 9 July 2018, 4:55 pm EST

  • Posted 9 July 2018, 4:55 pm EST - Updated 30 September 2022, 9:04 am EST

    The sample attached.



    SectionReportApplication2.zip

  • Posted 9 July 2018, 5:35 pm EST

    Hello,

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

    Hope it helps.

    Thanks,

    Mohit

  • Posted 9 July 2018, 6:29 pm EST - Updated 30 September 2022, 9:04 am EST

    It helps in this case, but does not in another.

  • Posted 11 July 2018, 1: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

  • Posted 11 July 2018, 4:01 pm EST - Updated 30 September 2022, 9:04 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.

  • Posted 11 July 2018, 7:52 pm 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

  • Posted 11 July 2018, 10:05 pm 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

  • Posted 12 July 2018, 3:39 am EST - Updated 30 September 2022, 9:04 am EST

    GDI+ works fine in the System.Windows.Forms.Form. It is AR12 issue.

  • Posted 12 July 2018, 8:44 pm 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

  • Posted 12 July 2018, 9:32 pm EST

    You can fix this limitation.

  • Posted 15 July 2018, 8:52 pm EST

    Hello Ilia,

    I have forwarded your request to our developers’ team.

    Thanks,

  • Posted 31 July 2018, 10:53 pm EST

    Hello Ilia,

    Could you please try after setting the “CharacterSpacing” to “0.1”

    Thanks

  • Posted 1 August 2018, 2: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).

  • Posted 1 August 2018, 9:23 pm EST

    Hello,

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

    Thanks

  • Posted 1 August 2018, 10:24 pm EST

    Sample attached.

    In my sample the text is not cropped horizontally when “CharacterSpacing” is setting to “0”.

    SectionReportApplication2.zip[img]https://gccontent.blob.core.windows.net/forum-uploads/file-49f496d1-e2f1-4709-bc1e-d7a668679e52.png[/img]

  • Posted 1 August 2018, 10:52 pm EST

    Hello,

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

    Thanks,

  • Posted 2 August 2018, 12: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

  • Posted 2 August 2018, 8:06 pm EST

    Hello Ilia,

    Sorry for the confusion.

    I have forwarded your request to our developers’ team.

    Thanks

  • Posted 5 August 2018, 10:39 pm 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,

  • Posted 7 August 2018, 8:40 pm 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.

  • Posted 7 August 2018, 9:40 pm EST

    Hello Ilia,

    I have forwarded your issue to our developers’ team.

    Thanks

  • Posted 8 August 2018, 8:09 pm 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.

  • Posted 9 August 2018, 12:11 am EST - Updated 30 September 2022, 9:04 am EST

    How do you do Sergey,

    Your code works fine in Form, but WinViewer control looks garbled.

  • Posted 9 August 2018, 6:23 pm EST - Updated 30 September 2022, 9:04 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.

  • Posted 16 August 2018, 4:37 am EST

    Maybe, MicroSoft will fix this issue within the next six months.

    Workaround: Add “\0” in the end of string. (“"WrapMode" \0”)

  • Posted 26 August 2018, 5:21 pm 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