Share a lazy rdlc Report (4) rdlc Report (4)

Source: Internet
Author: User
Tags crosstab

From lazy sheets: rdlc Report (4)

A rdlc report is called a data area
Region). The data area is a data-bound report project. Multiple rows of data from the dataset can be displayed in the data area. The data area in the rdlc report designer contains a series of controls on the control panel.
Items: List, table, matrix, chart ,,

The use of the list control is that it is a control in which you can freely arrange controls such as textbox and image. The chart control is used to display charts, which is similar to the charts in Excel. These two controls are not involved in this article. Let's mainly talk about the table and matrix controls.

First, let's look at the table control. The table control consists of multiple parts, such as header, footer, detailed rows, and group header) group footer ,,

To design such a control, I think Microsoft must be simplifying the design of the report:

Before this control appears, let's look at the next one with heaer, detailed
How to Implement rows and footer reports with statistical information. First, the report needs to display the report header, body, and report footer, and then drag a series
Label forms the table's title row. Then, drag the subject into a series of textbox to display the data row, and drag a series of labels or textbox in the report footer for display.
Statistics. Even though these labels or textbox must be aligned in a certain direction, it is very difficult to adjust the width of the control. If you need to display table lines, you cannot use them.
Line controls are hand-painted, which is a very troublesome task. I believe no one will like to design such a simple report in such a troublesome way.


Now, Microsoft introduces the table control. All you need to do is to determine the number of columns in the table (because the number of columns in the table needs to be fixed), and then
Drag the sources panel to the data row of the table control. The report designer automatically generates the title information in the title row.
Microsoft even designed an expression Generator for us, which is easy to use. The column width can be adjusted by dragging, and the table line can be done by setting the properties of the table control.

Yes, everything is so simple! This is probably the reason why you cannot find the report header and report footer in the report designer of Visual Studio 2005, only the page header and page footer) that's enough!

Of course, a report may also require a list control instead of a data area neatly arranged like a table.

In practical applications, it is found that a table control can have zero, one or more headers or footers, or even no detailed
Rows, what is the role of such a table control? We know that detailed
Rows is used to display multiple rows of data, while heaer or footer can be used to display statistics such as sum and count. Assume that our data set has a master table and a sub-table (for example
Inner
Join to obtain a query), and at this time we need to separately display the information of the main report to form a style of the main table and sub-table for the entire report, then we can use the data without detailed
Rows table control. Specify first (Fields! Field name. value,
"Data Source Name"), which at least reduces the trouble of arranging the field information. That is to say, the table control is very flexible. There is an article on codeprojectArticle
One to multiple reports with. NET 2005 (2.0) report designer (http://www.codeproject.com/dotnet/1tomanyreports_vsnet2005.asp) is the main sub-Report displayed with this main sub-dataset, but I personally think it is not as simple as the method described above, at most, a parameter can be added to the report to identify the master record. Of course, the subreport control is still required for the main and sub-Reports of the Apsara infrastructure management framework.


Let's take a look at the matrix control. This control can be seen as another innovation of Microsoft. In the past, there may be a crosstab (crosstab), but the Matrix Control
It is not only a cross table, but also a pivot table with the drill-down function ). The matrix control consists of the following parts:

 


If we use a common dataset to draw a crosstab, it will be a very troublesome task. We need to: Set the row title for the data perspective report; calculate the number of possible Column Titles
Set the column title, and cyclically query the values determined by the current row title and column title in the dataset Based on the row title and column title. The calculation workload is sufficient. As a Microsoft encapsulated
The control and matrix control obviously do not need to be so troublesome. Simply drag the control and set its properties. Of course, the most important thing to use a cross tabulation in a report is that the final result must be meaningful.
.


Note that when a report containing the matrix control is exported to an Excel file, even areas with the drill mark that are not displayed will be displayed. You may have the following questions: since
It is a pivot table. Why cannot it be displayed as a collapsed style in Excel? This is because the report export function does not depend on Excel.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.