c# - Make whole SSRS report repeat by groups -
i'm not sure of best title question.
i have particular problem seems pretty common haven't found way solve yet.
let's have rdlc report customers, , has 3 sections subreports:
customer_info (name, phone, e-mail)
items
observations
as page has 21cm , report grows horizontally, need repeat whole report of sections after every 4 customers. if have 5 customers, there 3 pages(let's every subreport takes 1 page) first 4 customers, , 3 pages(with every section once again) 1 customer.
is possible? doesn't seem somehing out of ordinary, can't figure how make work. everytime there more 4 customers, report breaks layout trying accommodate records in new table below tables of each subreport. expected result bring of exceeding data new pages.
thanks in advance.
edit:
i made fiddle picture i'm trying achieve:
report @ moment:
<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>
report has be:
<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>
what using matrix column group formula? i'm guessing have number use convert customer number. used rownum field when did similar.
to limit number of columns in matrix, use mod function in column grouping.
=fields!row_num.value mod 4
then add level of row grouping break customers -
=int((fields!row_num.value - 1) / 4)
Comments
Post a Comment