Solved

Conditional Pagebreak in SSRS

Posted on 2012-03-14
4
2,443 Views
Last Modified: 2012-03-15
Hi Experts,

How experts, I need to create a pagebreak based on a pagebreak parameter in SSRS 2008R2.

If the the parameter returns a  1 =  pagebreak and if it returns 0 no page break. Would would be the best way to accomplish this task and what would be a sample of the code?


Thank You
0
Comment
Question by:December2000
  • 2
  • 2
4 Comments
 
LVL 37

Assisted Solution

by:ValentinoV
ValentinoV earned 500 total points
ID: 37723589
You can use a Rectangle for that.  Put it where you'd like to have the pagebreak.  Make sure to activate the "Add a page break before" property of the rectangle.

Then use the Hidden property to either have a page break or not (when the rectangle is hidden, there's no page break).  The Hidden property allows expressions so you'll be able to use your parameter.
0
 

Author Comment

by:December2000
ID: 37724493
Thank you by: Valentino, Can you gice me an example of how I would write the expression in hidden property? If the the parameter returns a  1 =  pagebreak and if it returns 0 no page break.
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
ID: 37724549
Something like this:

=Not Parameters!PageBreak.Value

The expression above assumes that your parameter is called PageBreak and that its type is boolean.

In case the parameter is of type integer, then you'll need an expression as follows:

=IIF(Parameters!PageBreak.Value = 1, false, true)
0
 

Author Closing Comment

by:December2000
ID: 37724717
Thank you!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question