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
Forums Home / ComponentOne / WinForms Edition
Posted by: irvingcruz211079 on 23 April 2019, 8:05 am EST
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