Report Builder Stimulsoft User Manual: Reports with dynamic data sorting in preview

Stimulsoft Reports is a report writer mainly used to create reports of any complexity from scratch on desktop and web. Can be easily deployed on most platforms, such as ASP.NET, WinForms, .NET Core, JavaScript, WPF, Angular, Blazor, PHP, Java, etc. Embed the report designer in your application or create reports online, support Quickly share your reports from the cloud.

Stimulsoft Reports official download (qun: 740060302)icon-default.png?t=N7T8https://www.evget.com/product/2398/download   

When designing a report, the data used in the report is not always sorted in the desired order. In this case, sorting can be done via Report Builder. One way to sort data is dynamic sorting. A report with dynamic data sorting in the preview window is an interactive report, and you can change the dynamic data sorting by clicking on the dynamic sorting-enabled component. Follow these steps to render a report with dynamic data sorting in the preview window:

1. Run the designer;

2. Connect data:

2.1. Create a new connection;

2.2. Create a new data source

3. Add a DataBand on the report template's page.

stimulsoft

4. Edit the data strip:

4.1. Align DataBand by height;

4.2. Change the data band attribute value. For example, if you want the data band to break, you can set the "Can Break" property to true;

4.3. Change the data band background;

4.4. If necessary, enable the border of the data band;

4.5. Change border color

5. Use the data source property to set the data source of DataBand:

stimulsoft

6. Place the text component with the expression into the DataBand. where expression is a reference to a data field. For example, place three text components with expressions: {Products.ProductName}, {Products.QuantityPerUnit}, and {Products.UnitsInStock};

7. Edit text and text box components:

7.1. Drag and drop the text component into the DataBand;

7.2. Change text font parameters: size, type, color;

7.3. Align text components by width and height;

7.4. Changing the background of the text component

7.5. Aligning text in text components

7.6. Change the property value of the text component. For example, if you need to wrap text, you can set the "Word Wrap" property to true;

7.7. If desired, enable borders for the text component.

7.8. Change border color.

stimulsoft

8. Click the Preview button or click the Preview menu item to invoke the viewer. After rendering, all data field references to the specified fields in the data table will be changed. Data will be output in sequential order from the database defined for the report. The number of copies of the DataBand in the rendered report will be the same as the number of data rows in the database.

stimulsoft

9. Return to the report template;

10. If necessary, add other bands to the report template, such as report title band and report summary band;

11. Edit these bands:

11.1. Align by height;

11.2. Change attribute values ​​as needed;

11.3. Changing the ribbon background

11.4. Enable borders as needed

11.5. Set border color

stimulsoft

12. Place text components with expressions into these bands. The expressions in the text component are the title in ReportTitleBand and the summary in ReportSummaryBand.

13. Edit text and text components

13.1. Drag and drop the text component into the band;

13.2. Change font options: size, type, color;

13.3. Align text components by height and width

13.4. Changing the background of a text component

13.5. Aligning text in text components

13.6. Change text component property values ​​as needed

13.7. Enable borders on text components if desired

13.8. Set border color

stimulsoft

14. Click the "Preview" button or click the "Preview" menu item to invoke the viewer. After rendering, all references to data fields will be changed on the specified fields in the data table. Data will be output in sequential order from the database defined for this report. The number of copies of the DataBand in the rendered report will be the same as the number of data rows in the database.

stimulsoft

15. Return to report template;

16. Select a text component or any other component, click on it and sort in the rendered report. In this example, select the TextBox4 component with the ProductName text in the title bar;

17. Change the value of the Interaction.Sorting Column property. The value of this property will be a column in the data source and will be sorted based on that column. Set the Interaction.Sorting Column property to DataBand1.ProductName;

18. Click the Preview button or call the viewer and click the Preview menu item. After rendering, all data field references to the specified fields in the data table will be changed. Data will be output in sequential order from the database defined for this report. The number of copies of the DataBand in the rendered report will be the same as the number of data rows in the database.

stimulsoft

19. To sort the data by a specified data column, click the report component that previously set the Interaction.Sorting Column property. In our example, TextBox4 should be clicked. After clicking on the text component, the data will be sorted in ascending direction. To change the sorting direction from "Ascending" to "Descending", you need to click the text component again. The sorting direction will change each time you click the text component. The following image shows the first page of the report in different sorting directions:

 

The sort direction displays the "arrow" icon.

Add style

1. Return to the report template;

2. Select the data band;

3. Change the values ​​of the even style and odd style properties. If the values ​​for these properties are not set, select Edit Style in the Value list for these properties, and then use the Style Designer to create a new style. The following image shows the style designer:

stimulsoft

Click the "Add Style" button to start creating a style. Select a component from the drop-down list. Set the Brush.Color property to change the background color of a row. The following image shows an example style designer with a list of Brush.Color property values:

stimulsoft

Click Close. Then a new value will appear in the list of the Even Row Style and Odd Row Style properties (Styles for Odd and Even Rows).

4. To display the report, click the Preview button or to invoke the viewer, click the Preview menu item.

stimulsoft

The above is the introduction to reports with dynamic data sorting in the Stimulsoft Reports preview. If you have any other questions, please feel free to chat with us~

おすすめ

転載: blog.csdn.net/m0_67129275/article/details/134871443