FlexReports SubReports Fields from code

Posted by: irvingcruz211079 on 23 April 2019, 8:05 am EST

    • Post Options:
    • Link

    Posted 23 April 2019, 8:05 am EST

    How I can from code, access to subreports fields.

    For example (as old c1report)

    Reporte.Sections(“Detail”).Fields(“DIFERENCIAS”).Subreport.Sections(“Header”).Fields(“titleLbl”).Text

  • Posted 23 April 2019, 9:10 pm EST

    Hello,

    Since the designer-created fields are added in the report’s Fields collection, you’ll need to directcast them to the particular field object that represents it in the report.

     Dim srField As SubreportField = CType(_c1flxr.Fields("SubreportField"),SubreportField)
    Dim tField As TextField = CType(srField.Subreport.Sections("Header").Fields("titleLbl"),TextField)
    Dim str As String = tField.Text
    
    

    Here, it is considered that “titleLbl” is a TextField.

    Best Regards,

    Esha

Need extra support?

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

Learn More

Forum Channels