RDLC 表 - 垂直和水平合并单元格 [英] RDLC tables - merging cells vertically and horizontally

查看:117
本文介绍了RDLC 表 - 垂直和水平合并单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个新的 RDLC 报告(作为 WinForms 应用程序的一部分),我需要让报告采用一个简单的表格(6 列简单数据),并为表格中的每一行显示一个框包含该数据,但排列使得该框中的前两个行"首先包含一个图像(两个单元格"垂直合并),然后是两个值(彼此上方 - 每个在自己的行"上).然后它需要包含 3 个值(作为与整个框一样宽的单独行"(即水平合并两个单元格)

I am working on a new RDLC report (as part of a WinForms application) and I need to have the report take a simple table (6 columns of simple data), and for each row in the table, display a box that contains that data, but arranged such that the first two "rows" in that box consist of first an image (two "cells" merged vertically) and then two values (above each other - each on their own "row"). Then it needs to include 3 values (as separate "rows" as wide as the entire box (i.e. merging the two cells horizontally)

它需要为每一行数据重复整个框.

And it needs to repeat that entire box for every row of data.

鉴于它包括单元格的水平和垂直合并(我不确定如何在 RDLC 的表格或矩阵中执行此操作),我该如何实现?

How can I accomplish this, given that it includes both horizontal and vertical merging of cells (and I'm not sure how to do that in either a table or matrix in the RDLC)?

这是一个模型,以更好地展示我需要的东西:

Here is a mock-up of this, to better show what I need:

推荐答案

我找到了解决方案 页面

默认情况下,添加分组时会创建单行标题或 Tablix 中的字段.为了合并两行的两个单元格列,请尝试以下步骤:

By the default, a single row header is created when adding a grouping or field in a Tablix. In order to merge two cells of two rows in a column, try the following steps:

注意:仅当生成行标题"时,以下内容才有效通过添加父组或子组".如果这只是从数据集,您将永远不会看到合并单元格选项.

Note: The following will only work if the "Row Header was generated by adding a parent or child group". If this was just dragged from a dataset, you will never see the merged cell option.

  1. 在单行标题上方插入一行(这也是分组标题).此时的原始标题将位于第二行.
  2. 通过按住 Ctrl 键并单击单元格,垂直选择相邻的单元格(例如,一列中两行的两个单元格).这选择应由深灰色粗边框突出显示边缘.
  3. 在空白区域右键单击您的选择,您应该在弹出菜单中合并单元格".选择合并单元格".
  4. 在此阶段合并两个相邻的垂直单元格.您需要再次编写标签文本,因为合并会将其删除.至将文本居中,您可以先按 Enter 键,通常情况下它会中心.
  5. 对需要合并的其他列执行此操作.

这篇关于RDLC 表 - 垂直和水平合并单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆