RichTextBox ReplaceField Broken in 16.1.2?

Posted by: kim.phillips on 29 October 2022, 12:13 am EST

    • Post Options:
    • Link

    Posted 29 October 2022, 12:13 am EST

    We just upgraded from v14 to v16.

    It appears that the ReplaceField method on RichTextBox doesn’t work.

    I tried putting the code in every event on the report and on the section to no avail.

    Are you all aware of this and is this address in v16.2.1?

  • Posted 30 October 2022, 8:24 pm EST

    Hi Kim,

    I tested the ReplaceField method in ActiveReports 16.2.1. The method seems to be working fine at my end. Please refer to the attached sample for reference.

    If the issue still persists then please share a sample replicating this issue so we can reproduce this issue at our end and investigate further on this.

    RichTextBoxTest.zip

  • Posted 20 March 2024, 8:26 am EST

    Hello, i have the same problem, but i’am migrating from AR8 to AR18. In AR8, works fine richTextBox1.ReplaceField(“name”, “John Doe”) but with AR18 does not.

    I have to replace the code with <<richTextBox1.RTF = richTextBox1.RTF.Replace(“[!name]”, “John Doe”)>>

    Hope you can help, because the project is with many many RTF fields.

            // 
            // richTextBox1
            // 
            this.richTextBox1.AutoReplaceFields = true;
            this.richTextBox1.Font = new GrapeCity.ActiveReports.Document.Drawing.Font("Arial", 10F);
            this.richTextBox1.Height = 1.371F;
            this.richTextBox1.Left = 0.086F;
            this.richTextBox1.Name = "rtfParrafo1";
            this.richTextBox1.RTF = resources.GetString("richTextBox1.RTF");
            this.richTextBox1.Top = 6.468F;
            this.richTextBox1.Width = 7.480556F;
    

    Thank you in advance

  • Posted 21 March 2024, 8:09 pm EST

    Hi Jesus,

    I upgraded the previously shared sample to ActiveReports 18 and it seems to be working fine at my end. Please refer to the modified sample.

    If the issue still persists then please share a sample replicating this issue so we can reproduce this issue at our end and investigate further on this.

    RichTextBoxTest.zip

Need extra support?

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

Learn More

Forum Channels