?
Solved

Conditional Pagebreak in SSRS

Posted on 2012-03-14
4
Medium Priority
?
2,753 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 37

Assisted Solution

by:ValentinoV
ValentinoV earned 2000 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 2000 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

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…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Suggested Courses

770 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