Report Tool Stimulsoft Reports User Manual: Chart Reports in Data Strips

Stimulsoft Reports.Net is a report generator based on .NET framework, which can help you create structured and feature-rich reports. The report designer of StimulReport.Net is not only friendly in interface, but also easy to use, allowing you to easily create all reports; the report designer can be used during the report design process and the report running process. Use of StimulReport.Net's report designer at runtime does not require any royalty payments.

The created reports can be used in both Windows Forms applications and Asp.Net applications. Can export a variety of data formats, such as: PDF, XML, HTML, Word, Excel, RTF format, text file, CSV, BMP and JPEG format, GIF, PNG, TIFF format, etc.

Click to download the latest version of Stimulsoft Reports.Net (qun: 740060302) icon-default.png?t=N6B9https://www.evget.com/product/1071/download

Suppose a Chart component is placed on the page of the report, then for a report, this component will be rendered as a page item. If the Chart component is placed in the DataBand, the component will be rendered as part of the DataBand when the report is rendered. Since the chart is placed in the part DataBand, rendered as part of the DataBand, and the number of times that will be printed will be output as the DataBand. An example of designing a report with charts in DataBand will be described below. In this case, the chart will graphically display bands of detailed data from the data source. Follow the steps below to render the DataBand with the report:
1. Run the designer;
2. Connect the data:
2.1. Create a new connection;
2.2. Create a new data source;
3. Create a relationship between data sources. In this case, the parent data source is the category data source, and the child data source is the product data source;
4. Put the DataBand on the report template page:

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

5. Edit the data band:
5.1. Align the DataBand by height;
5.2. Change the value of the band property. For example, if you want to break the data band, please set the Can Break property to true;
5.3. Change the DataBand background;
5.4. If necessary, enable the border for the DataBand;
5.5. Change the border color.
6. Use the Data Source property to define the data source of the DataBand:

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

7. Put the Chart component into the DataBand, as shown in the figure below:

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

8. Edit the chart component:
8.1. Align by width;
8.2. Change the properties of the chart component. For example, set the GrowToHeight property to true, if the Chart component needs to grow by height;
8.3. If necessary, set Borders for the Chart component;
8.4. Change the border color.
8.5. Editing the chart area. For example, if you need to change the color of the chart area, change the Area.Brush.Color property.

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

9. Change the chart type using the Chart Type property. For example, setting it to Clustered Column:

10. Use the Data Source property to define the data source of the Chart component

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

11. To define the relationship between data sources, use the DataRelation property of the Chart component:

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

12. Add the series. For example, to invoke the Series Editor by double-clicking on the Chart:

13. Set the chart series:
13.1. Get the data of Value and Argument of series. There are three ways to get the data of a series: setting the column data from a dictionary, or specifying an expression, or manually specifying the values ​​of the series as a list via the "," delimiter. For example, create a series from a dictionary and specify the columns: define Products.ProductName as parameter and Products.UnitPrice as value;
13.2. Change the value of series property. For example, set the Show Zeros property to false if zero values ​​need to be hidden;
13.3. Enable or disable series labels;
13.4. Edit row headers: align, change style, font, value type, etc.;
13.5. Change the design of the series: Border Color, Brush, Show Shadow.
The following image shows an example report template with charts:

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

14. Edit the legend:
14.1. Enable or disable the visibility of Legends. You can achieve this by setting the value of the Legend.Visible property to true or false respectively;
14.2. Align the legend horizontally and vertically;
14.3. Change the design of the legend, etc.  
The following image shows an example of a report template with a chart showing a legend:

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

15. Change the style of the chart to completely change the appearance of the chart:
15.1. Change the style property. The value of the attribute is the chart style;
15.2. Set AllowApplyStyle to true. If the AllowApplyStyle property is set to false, the report generator will take the value of the series appearance into account when rendering.
The following image shows an example report template for a chart with changed styles:

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

16. Put the text component with the expression in the DataBand. where expression is a reference to a data field. For example, place a text component with an expression: {Categories.CategoryName};
17. Edit the Text and TextBox components:
17.1. Drag and drop the text component into the DataBand;
17.2. Change the text font parameters: size, type, color;
17.3. Align text components according to width and height;
17.4. Change the background of text components;
17.5. Align text in text components;
17.6. Change property values ​​of text components. For example, if you need to wrap text, please set the Word Wrap property to true;
17.7. If necessary, enable the border for the text component.
17.8. Change border color.

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

18. Click the Preview button or to invoke the viewer, click the Preview menu item. The image below shows an example of a report with a DataBand chart:

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

add style

1. Go back to the report template;
2. Invoke the style designer;
the figure below shows the style designer:

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

Click the Add Style button to start creating styles. Select a chart from the drop-down list. Use the Basic Color Style, Brush Type, and Style Colors property groups to set the style.

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

Click Close. In the list of Style property values ​​of the chart component, the custom style will be displayed. In our example, the value is Style of Chart. select this value;

3. Click the Preview button or to invoke the viewer, click the Preview menu item. The following image shows an example report with a styled chart:

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

Stimulsoft Reports User's Manual: Chart Reports in Data Strips

Guess you like

Origin blog.csdn.net/m0_67129275/article/details/131933202