Rdlc horizontal tables, fixed Rows and dynamic Columns

Source: Internet
Author: User

Http://blogs.msdn.com/ B /chrishays/archive/2004/07/23/horizontaltables.aspx


Does reporting services support horizontal tables (fixed Rows and dynamic columns )?

There is no native "horizontal table" report item, but simple horizontal tables can be simulated using matrix.

Step 1:Add a matrix to your report

Step 2: Add static rows to the matrix
right-click in the data cell and select" add row ". repeat for the number of fixed Rows you want.

Step 3: drag fields into the data cells
you'll notice that the design tool automatically wraps your field reference in the" first "aggregate (e.g. = first (Fields! City. value )).
since you're doing this in the context of a matrix, the design tool is
ensuring that the expression is meaningful even in the context of a
subtotal or if the matrix is showing aggregated data rather than detail
data. since you're going to show detail data without subtotals, you
technically cocould remove the aggregate expression (but don't, since then
you'll start getting warnings which you'll need to ignore ).

Step 4:Add a column grouping
Right-click on the column header and select "Edit Group". Enter this for the group expression: = rownumber (nothing ).
This will cause the Matrix to give you one column per row of data.
Since horizontal tables can end up rather wide, you probably want your
Table wrap around to the next "line" after a specific number of columns.

Step 5:Put the table into a list
Add a list to your report and drag the table into it

Step 6: group by a number of rows
right-click on the list and select Properties. then click on edit details group.
enter this for the group expression: = ceiling (rownumber (nothing)/3)
this will cause the list to group on every three rows. so you'll get a separate table for every three rows.

Step 7:Adjust the group expression in the Matrix
Edit the column group expression in your matrix and change the rownumber argument to be the List Group name.
For example: = rownumber ("listparts details_group ")


A full working sample of horizontal table is attached.


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.