我不确定这个问题的最佳标题。
我有一个特别常见的问题,但我还没有办法解决它。
我们说我有一个针对客户的rdlc报告,它有三个子报告部分:
CUSTOMER_INFO(姓名,电话,电子邮件)
项
观测
由于页面只有21厘米且报告水平增长,我需要在每4个客户之后重复整个报告及其所有部分。 因此,如果我有5个客户,前四个客户将有三个页面(让每个子报告占用1页),然后另外三个页面(每个部分再次)仅供一个客户使用。
有可能吗?它看起来并不常见,但我无法想象如何让它发挥作用。每次有超过4个客户时,报告会打破其布局,尝试在每个子报表的表下方的新表中容纳记录。预期的结果是将所有超出的数据带到新页面。
提前致谢。
修改
我画了一个小提琴,准确描绘了我想要实现的目标:
目前报道:
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>- jsFiddle demo</title>
<script src="/js/lib/dummy.js" type="text/javascript"></script>
<link href="/css/result-light.css" type="text/css" rel="stylesheet">
<style type="text/css">
#table, th, tr, td {
border: 1px solid black;
margin: 0, 0, 0, 0;
}
.wrong {
width: 100px;
height: 24px;
}
.page {
text-align: center;
border: 1px solid black;
margin-top: 30px;
}
</style>
<script type="text/javascript">
//<![CDATA[
window.onload = function() {
} //]]>
</script>
</head>
<body>
<div class="page">
<h2> PAGE 1 </h2>
<table style="width:100%">
<tbody>
<tr>
<th>CUSTOMER NAME</th>
<th>CUSTOMER 1</th>
<th>CUSTOMER 2</th>
<th>CUSTOMER 3</th>
<th>CUSTOMER 4</th>
</tr>
<tr>
<th>ADDRESS</th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th>PHONE</th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th>EMAIL</th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<th>CUSTOMER 5</th>
<th>CUSTOMER 6</th>
</tr>
<tr>
<td class="wrong">some info</td>
<td class="wrong">some info</td>
</tr>
<tr>
<td class="wrong">some info</td>
<td class="wrong">some info</td>
</tr>
<tr>
<td class="wrong">some info</td>
<td class="wrong">some info</td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<table style="width:100%">
<tbody>
<tr>
<th>EXPENSES</th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th>TAXES</th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th>TOTAL</th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td class="wrong">some info</td>
<td class="wrong">some info</td>
</tr>
<tr>
<td class="wrong">some info</td>
<td class="wrong">some info</td>
</tr>
<tr>
<td class="wrong">some info</td>
<td class="wrong">some info</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
&#13;
报告必须:
<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title> - jsFiddle demo</title>
<script src="/js/lib/dummy.js" type="text/javascript"></script>
<link href="/css/result-light.css" type="text/css" rel="stylesheet">
<style type="text/css">
#table,th,tr, td{
border: 1px solid black;
margin: 0,0,0,0;
}
.page {
text-align: center;
border: 1px solid black;
margin-top: 30px;
}
</style>
<script type="text/javascript">//<![CDATA[
window.onload=function(){
}//]]>
</script>
</head>
<body>
<div class="page">
<h2> PAGE 1 </h2>
<table style="width:100%">
<tbody><tr><th> CUSTOMER NAME </th>
<th> CUSTOMER 1 </th>
<th> CUSTOMER 2 </th>
<th> CUSTOMER 3 </th>
<th> CUSTOMER 4 </th>
</tr><tr>
<th>ADDRESS</th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th>PHONE</th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th>EMAIL</th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
</tbody></table>
<br>
<br>
<br>
<table style="width:100%">
<tbody><tr>
<th> EXPENSES </th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th> TAXES </th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th> TOTAL </th>
<td>some info</td>
<td>some info</td>
<td>some info</td>
<td>some info</td>
</tr>
</tbody></table>
</div>
<div class="page">
<h2> PAGE 2 </h2>
<table style="width:100%">
<tbody><tr><th> CUSTOMER NAME </th>
<th> CUSTOMER 5 </th>
<th> CUSTOMER 6 </th>
</tr><tr>
<th>ADDRESS</th>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th>PHONE</th>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th>EMAIL</th>
<td>some info</td>
<td>some info</td>
</tr>
</tbody></table>
<br>
<br>
<br>
<table style="width:100%">
<tbody><tr>
<th> EXPENSES </th>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th> TAXES </th>
<td>some info</td>
<td>some info</td>
</tr>
<tr>
<th> TOTAL </th>
<td>some info</td>
<td>some info</td>
</tr>
</tbody></table>
</div>
</body></html>
&#13;
答案 0 :(得分:0)
您对矩阵列组公式使用了什么?我猜你有一个用于转换为客户编号的号码。当我做类似的事情时,我使用了RowNum字段。
要限制矩阵中的列数,请使用列分组中的MOD函数。
=Fields!ROW_NUM.Value MOD 4
然后添加另一个级别的行分组以分散您的客户 -
=INT((Fields!ROW_NUM.Value - 1) / 4)