FlexReport for WinForms | ComponentOne
Fields and Custom Fields / SuperLabel Custom Field
In This Topic
    SuperLabel Custom Field
    In This Topic

    SuperLabel fields are used to insert HTML text in reports. FlexReport supports SuperLabel fields using its extensible custom field architecture. In the following sections, you'll see how you to customize SuperLabel fields in reports using the FlexReportDesigner application. The SuperLabel custom field uses three assemblies, C1.Win.FlexReport.CustomFields, C1.Win and C1.Win.SuperTooltip, which should be in the same folder as the FlexReportDesigner app.

    To start using the SuperLabel custom field in the FlexReportDesigner application, complete the following steps:

    1. Run the C1FlexReportDesigner application.
    2. Confirm that the SuperLabel icon is present in the C1FlexReportDesigner toolbar. If it is not included, you may need to add the following line to the <customfields> section of the C1FlexReportDesigner.4.5.2.exe.settings/C1FlexReportDesigner.4.8.exe.settings/C1FlexReportDesigner.6.exe.settings file:
      • For Framework 6 version
        Copy Code
        <customfields>
            <item value="C1.Win.FlexReport.CustomFields.6;C1.Win.FlexReport.CustomFields.SuperLabel" />
        </customfields>
        
      • For Framework 4.8 version
        Copy Code
        <customfields>
            <item value="C1.Win.FlexReport.CustomFields.4.8;C1.Win.FlexReport.CustomFields.SuperLabel" />
        </customfields>
        
      • For Framework 4.5.2 version
        Copy Code
        <customfields>
            <item value="C1.Win.FlexReport.CustomFields.4.5.2;C1.Win.FlexReport.CustomFields.SuperLabel" />
        </customfields>
        

      You can find the C1FlexReportDesigner.4.5.2.exe.settings, C1FlexReportDesigner.4.8.exe.settings and C1FlexReportDesigner.6.exe.settings files at the following location:
      C:\Users\user_name\AppData\Roaming\C1Report\

      Note: The C1FlexReportDesigner.x.x.exe.settings file gets generated at the mentioned location only when the user first opens a report in the C1FlexReportDesigner and not at the time of installation of WinForms Edition.
    3. Create a new report or open an existing report. Refer the Quick Start for an example.
    4. Click the SuperLabel icon and drag it onto your report to add a SuperLabel field.

    That's it! Now, you have successfully added a SuperLabel field to your report.

    Let's now add a SuperLabel field to the report created in Map Custom Field.

    1. Open the report.
    2. Set PageHeader's Visible property to True.
    3. Drop a SuperLabel field in the Page Header section of the report.
    4. From the Properties window, set Text property to the following text:
      SuperLabel.Text
      Copy Code
      <html><body><font color="Red">Customers and Suppliers by City</font></body></html>
      
    5. In the designer, SuperLabel field should now look as follows:

      SuperLabel custom field

    6. Preview the report:

      Preview SuperLabel custom field.