A Guide to FlexReport Designer Features
While designing reports, you'll likely look for how easy it is to use the Designer and implement the reporting features. You won't want to use complex mechanisms for using simple features. FlexReport Designer makes report designing more flexible and efficient than before. Here's a simple walkthrough of the new features offered by FlexReport Designer.
FlexReport Designer Feature Overview
UI Features
- SnapLines provide multiple advantages to design reports. You don't have to turn this property on or off; it's set by default in the designer. Just click the control in Insert tab and draw it on the designer. You can:
- Align the control with relation to other controls with the help of outlines around the controls.
- Select and resize all controls on the Designer to similar length andwidth with the snaplines indication.
- Identify the spacing of the control from other controls.
- Collapsible/Expandable Sections: You can collapse and expand sections per your needs, in case you're working with a long report design. Every section has a collapse/expand button on top right.
- Show Captions: You can choose various options to show section header strips while designing reports. Go to Home tab > View section to make use of this option.
- All: Shows header strips in all sections
- Section: Shows header strip only on section but not on sub-sections.
- Hairline: Hides all section strips and shows a colorful strip on left to distinguish between the sections.
- Hidden: Hides all boundaries between sub-sections (captions and lines - everything). This may be useful when designing a group header and detail that must merge seamlessly at runtime so that you can see two adjacent sections as they'll appear at runtime.
- Chart editors: In order to use charts and make binding with data easier, different editors have been added to the chart field. Using these editors, you can set chart data source (set category groups, series groups, series values), chart properties to choose different chart types and extensive API; and chart visual effects to set numerous visual effects, colors, palettes on the charts.
- Data Tab: This feature offers a simple way to use a common reporting feature: the new tab makes it easier to add and manage data source, parameters, sorting expressions and calculated fields in the report. These are discussed in more details below.
- Edit expression: With every text, database field or an expression, you can right-click and choose the option of Edit Expression . This gives you direct access to the VBScript Editor.
- Align General: This option is available in the text group of Home tab. It automatically aligns numbers to right and other text to left.
How to Use Reporting Features
DataBinding
Data binding is still the same as in C1ReportDesigner. But there are more ways to work with data sources after binding a report.
- Open C1FlexReportDesigner.exe
- Go to File > New
- In reports tab, click New Report.
- Follow binding steps in C1FlexReport Wizard.
Note that the data source and the database fields appear under Main data source.
You can also edit the data source from Data Sources dropdown in data group of Home tab. You can also edit and rename the data source from the data tab by right-clicking Main data source.
IntelliSense
Make use of the intuitive VBScript Editor to code runtime operations through scripts in reports. The editor has wide range of scripts for report and report sections. You can choose any script and code any runtime operation. The editor has entire set of VB and report objects in IntelliSense with description of the properties. You can insert database fields and directly set properties in the editor. The report parameters can also be accessed in the editor, so you can do any operation with whatever values user inputs.
Adding Subsections
FlexReport offers a new feature of adding subsections. Subsections help you to format different areas of a section and set properties on specific sections. For instance, you can use subsections to create headers and footers. Here are some steps how to add subsection to the report.
- Right-click a section.
- Choose Add SubSection.
Alternately:
- Select a section.
- Go to Insert tab.
- Choose Add in subsections group of the ribbon.
Note:
- To use sections with various options of header strips, choose different options from Show Captions in Home tab's View group.
- To collapse sections and subsections, right-click a section and choose Collapse or Collapse All But This. Or, you can choose Show Caption > Collapse All option to collapse all sections.
- To expand sections and subsections, choose Show Captions > Expand All
- You can also use + and - options on section headers to collapse and expand sections.
Adding Parameters
In C1Report, users had to define parameters in SQL Query. With FlexReport, user can take advantage of adding parameters through data tab and simple setting properties from the Property Grid.
To bind parameters with values from data base, add another database in data tab. Following steps assume, Main data source is already present in the report using data binding steps.
- To add another data source, go to Data tab.
- Right-click Main data source and choose Add Data Source.
- Bind with C1Nwind.mdb.
- Write the following SQL Query: Select * from Products.
- Click OK.
- In the data tab, right-click Parameters.
- Choose Add Parameter.
- Select Parameter().
- In the Property Grid, click on AllowedValuesDefinition ellipsis.
- If you want to create data bound parameter, select From Binding.
- Choose data source name as DataSource1
- Set Label expression to ProductName.
- Set Value expression to ProductName.
- Click OK.
- In Parameter() properties, set Prompt as ProductName.
- Right-click Main datasource and choose Edit.
- Set the SQL Query as: Select * from Products where ProductName = Parameter0.
- Preview the report.
The new Parameter Panel appears, asking you to enter ProductName as parameter.
Adding Calculated Fields on Data Source
With multiple datasources, FlexReport adds ability to add calculated fields on every data source. The VBScript Editor can access all database fields, report parameters, other calculated fields of the datasource and report fields.
- In the data tab, under Main data source, right-click Calculated Fields and choose Add Calculated Field.
- In the VBScript Editor, set an expression for the calculated field. For example, if the report is bound to the Products table, set expression as UnitPrice * Quantity.
- Click Done.
- CalculatedField() is added.
- Drop CalculatedField() on the designer for further usage.
Sort the Data
Mostly, sorting expressions are either added through scripts or in the groups of a report. But with FlexReport, you can now define sorting on the data source level.
- In the data tab, under Main data source, right-click Calculated Fields and choose Add Sort expression.
- In the expression editor, set expression to database field. For example, if the report is bound to the Products table, set expression as ProductName.
- Click Done.
- Select Sort Expression in data tab and view Property Grid.
- The direction and other properties can be set in the Property Grid.
-
Preview the report.
The report is sorted on the basis of sort expression.
Filter the Data
Often reports need to filter data based on some condition. Such filtering expressions are easy to add in FlexReport Designer through the Filter property of data source. The FilterSyntax property will help you to choose out of two enum values: DataView, which makes expressions compatible with C1Report, and VBScript.
- Bind FlexReport with Orders table.
- Click on Main data source in the data tab.
- In the Property Grid, click Filter ellipsis.
- Add following expression: OrderID > 10270.
The report will be filtered with OrderID greater than value 10270.
Adding Paragraph Field
This innovative feature is new in FlexReport. ParagraphFields allow the use of multi-formatted text, database fields, scripts, parameters, and calculatedFields. In edit mode, you can implement following features.
You can add a ParagraphField using the following steps in FlexReportDesigner:
- Create new FlexReport in FlexReport Designer.
- Bind it with Products table.
- From the Insert tab, add ParagraphField on the report.
- Double-click the ParagraphField to enter in edit more.
- Type Product:
To insert database fields:
- In edit mode, right-click and choose Insert Expression.
- In the expression editor, choose ProductID from DatabaseFields dropdown.
- Click Done.
- Select Product:{ProductID}and set forecolor as green from the ribbon.
For more information on ParagraphField, please refer to ParagraphField in documentation.
Adding charts
FlexReport offers 70+ chart types to suit data visualization needs of your business domains. It not only adds avariety of charts to choose from, it also provides various chart editors to make binding with data easier.
- Open C1FlexReportDesigner.exe.
- In the Insert tab, click Chart field and add it to the Designer.
- Right-click the chart to view new options: Chart Datasource, Chart Properties and Chart Visual Effects
To bind a chart with multiple data sources:
- Bind report with any database, such as Nwind.mdb > ProductsTable.
- The table gets added as Main data source.
- In the data tab click Add New Data Source.
- Bind with some other data source, such as Orders table.
- Set data source name as DataSource1.
- Right-click the chart and choose Chart Data Source.
- Set data source name to DataSource1.
If you want to generate Simple 2D chart, follow these steps:
- In the left pane, click Simple 2D chart.
- Click Create Simple Charts.
- Set chart type and set X and Y values to OrderID and Freight.
To use a bigger variety of charts and chart properties, follow these steps after step 7:
- Right-click chart and choose Chart Properties.
- Select respective chart type.
- Preview the report.
To set Visual Effects in charts:
- Right-click chart and choose any Chart Visual Effects.
- Preview the report.
These are some of the new features part of the new FlexReport Designer. Please refer to Working with FlexReport Designer in documentation for more features offered by FlexReport Designer.