Home > SSRS > Page break a tablix (matrix) based every 4 months

Page break a tablix (matrix) based every 4 months

I got this question from MSDN, question link here.

User comment:-

I have a matrix and the column group is showing all the months… Is there a way I can have a page break to show

Jan -APR and then May-Aug in the next and Sept-Dec in the page

Let create sample data first for the Matrix report. Sample data would like below:-

select ‘row1′ id, 1 monthnumber,’Jan’ MonthName,10 val
union
select ‘row1′ id, 2 monthnumber,’Feb’ MonthName,20 val
union
select ‘row1′ id, 3 monthnumber,’Mar’ MonthName,30 val
union
select ‘row1′ id, 4 monthnumber,’Apr’ MonthName,10 val
union
select ‘row1′ id, 5 monthnumber,’May’ MonthName,50 val
union
select ‘row1′ id, 6 monthnumber,’Jun’ MonthName,20 val
union
select ‘row1′ id, 7 monthnumber,’Jul’ MonthName,10 val
union
select ‘row1′ id, 8 monthnumber,’Aug’ MonthName,60 val
union
select ‘row1′ id, 9 monthnumber,’Sep’ MonthName,100 val
union
select ‘row1′ id, 10 monthnumber,’Oct’ MonthName,19 val
union
select ‘row1′ id, 11 monthnumber,’Nov’ MonthName,25 val
union
select ‘row1′ id, 12 monthnumber,’Dec’ MonthName,35 val

Lets create report and add Mtrix control.

Lets pull the list item into the report and give the expression as =Ceiling((Fields!monthnumber.Value)/4)

ListExpression

Now add the pagegroup as shown below:-

pagebreak

now run the report

report1

report2

Thanks
Prasad

Learn Different BI Tools
Subscribe my YouTube Channel : BI Tools

Advertisements
Categories: SSRS Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: