ComponentOne FlexReport for WinForms
FlexReport for WinForms Overview / FlexReport versus C1Report
In This Topic
    FlexReport versus C1Report
    In This Topic

    FlexReport is the newer and improved C1Report, with the following main differences:

    Hierarchy of report field types

    The structure of Field objects in FlexReport is hierarchical, with FieldBase as a base class, and other different class types to represent different fields. So, there are different types of report fields to represent text, image, shape, subreports, and other different types of data. The advantage of having a hierarchy of Field objects in FlexReports is that it makes working with fields quite easy and flexible.

    C1Report, on the other hand, has complex field objects that require defining the C1.C1Report.Field.Text property and setting Calculated to True. Here, each field is interpreted as an expression which is evaluated individually for each record, which slows down the process of rendering of data in C1Report's fields.

    Regardless of this, the field types in FlexReport are fully compatible with the field types in C1Report, which enables loading or rendering of C1Report definitions in FlexReport.

    Multiple data sources

    A FlexReport definition can have several data sources each identified by a unique name. In case a report contains multiple data sources, one of the data sources acts as the main data source for the report; the values from the other data sources can be used for adding report parameters and creating chart fields. For more information, see Data Sources in FlexReport.

    Improved data sorting

    FlexReport provides improved data source sorting capability. You can define several sort expressions for a data to specify the sorting condition and its direction using DataSource.SortDefinitions property.

    In addition, sorting and grouping of data are independent of each other, that is, you can apply grouping on a set of records as well as control the order of records through sorting. A simple example is sorting the data - City while grouping by - Country. This results in improved compatibility with Crystal Reports. See Sorting Data for more information.

    Improved data filtering

    FlexReport provides improved data filtering that can be specified in a regular VBScript (as all other expressions in C1Report or FlexReport) or in DataView (several expressions to specify the criteria to filter the data). The syntax type for filtering data in FlexReport is specified by setting FilterExpressionSyntax enum to DataView (which is default) or VBScript.

    Filtering in C1Report, on the other hand, is specified by C1Report.Filter property, which uses the limited syntax as the DataView.Filter property. Regardless of this, filtering in FlexReport is fully compatible with filtering in C1Report. For more information, see Filtering Data.

    Calculated fields for data source

    In FlexReport, data source supports Calculated fields, that is, calculated fields can be defined in the data sources to fetch calculated data. The expressions in the Calculated fields are specified through VBScript expressions in DataSource.CalculatedFields collection. These expressions can use other data source fields, report parameters, and so on. For more information, see Defining Calculated Fields. 

    Report parameters

    The report parameters in a report are used to modify the default values of the data and hence update the values when the report is rendered. In FlexReport, report parameters can be defined in the C1FlexReport.Parameters collection, where each element is an instance of the ReportParameter class, with some additional properties, that are described in Adding Parameters topic.

    In C1Report, parameters could be specified either in DataSource.RecordSource or in DataSource, using PARAMETERS "key word" in the connection string, such as the following string:

    C1Report.DataSource.RecordSource = “PARAMETERS param1 int 0; select * from Customers where id < param1”.
    

    When C1Report report definitions are loaded in FlexReport, parameters specified using DataSource.RecordSource and DataSource.Filter are imported correctly into the C1FlexReport.Parameters collection.

    Multiple Sub-sections

    In C1FlexReport, each section contains at least one sub-section. The sub-sections, just like sections, contain report fields. The advantage of adding sub-sections is that they help in enhancing the data present in their parent section. Sub-sections can be accessed through Section.SubSections collection property. For more information, see Adding Multiple Sub-sections.

    Visual properties

    See Also