Solved

Conditional Pagebreak in SSRS

Posted on 2012-03-14
4
2,395 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
need help in sql 4 65
TSQL case statement when a value is in the column more than 1 time 7 30
SQL Query Syntax Join 4 32
SQL VIEW 7 6
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
I have a large data set and a SSIS package. How can I load this file in multi threading?
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.
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now