Unable to programatically set the value of any textfield

Posted by: arne.larsen on 7 June 2024, 8:45 am EST

  • Posted 7 June 2024, 8:45 am EST

    I am using FlexReport from a VB application ver 4.8 and want to programatically set the value of a textfield in the reports header.

    For some reason I can’t set the value. According to the documentation Value is a public property but it doesn’t show up in intellisense.

    Here is my statement:

    C1FlexReport1.Fields.FindByName(“titleLbl2_Ferdige”).Value = “Testing”

  • Posted 9 June 2024, 11:55 pm EST

    Hi Arne,

    Apologies for the delay in response.

    The Text property that you need to change exists in the TextField class. The C1FlexReport.Fields.FindByName method returns a generic Field type object, that you must cast to TextField as follows:

    CType(C1FlexReport1.Fields.FindByName("fldReportHeader"), TextField).Text = "Text changed by code"

    Please see the attached sample project for reference - FlexReportFieldCode.zip

    Best Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels