p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 (http://p2p.wrox.com/book-professional-sql-server-reporting-services-isbn-0-7645-6878-7-127/)
-   -   Conditional Formatting on Page Breaks (http://p2p.wrox.com/book-professional-sql-server-reporting-services-isbn-0-7645-6878-7/32366-conditional-formatting-page-breaks.html)

mmoore August 10th, 2005 05:13 PM

Conditional Formatting on Page Breaks
 


Reporting Services Issue:



Our team is having a problems with the functionality in Reporting Services that generates page breaks. The page breaks don't seem to function when you add conditional logic to the visibility property of a control.



Project Goal:



Some sections of our reports are not to be displayed based on certain user entered parameters. When these sections are hidden, the page breaks were still displaying and creating multiple blank pages.



Attempted Solutions:



In an effort to resolve this issue, conditional logic was added to the page break rectangles in order to display or not display along with the other controls. This is where the issue was first noticed. The page breaks quit displaying regardless of the conditional logic.



After that attempt, there was a subreport created with the only object being a page break rectangle in order to abstract the page break from the conditional logic. On the report the conditional logic was then added to the subreport item containing the page break. The same results were observed.



In addition to the above mentioned solution attempts, embedding all page objects in a rectangle, multiple rectangles containing a page break, and every toolbox object was tested. All attempted solutions had the same results. Also, although this seems to be an issue others must have encountered, there is little information about page break logic online.



Questions:



Has anyone observed this problem, and if so, is there a solution?



rkhyd_in August 3rd, 2007 06:05 AM

Hi,

Did you get any answer to this? I am facing this problem myself.


DLBranson August 14th, 2007 03:07 PM

I am having the same exact problem that you are having. I am using a rectangle to set a conditional page break. Trying everyting I set a border color for my rectangle. When I run the report I see the rectangle. So my conditional statement is definately working. However it doesn't do the page break part.

If I take the conditional logic out, the rectangle does produce a page break.

What is really driving me crazy is that I have another report with conditional page breaks that appear to be working. I'm not sure if I got lucky or there is some setting that I have different.

Good luck with this one.

Dennis Branson

DLBranson August 14th, 2007 03:56 PM

I searched all over the web and finally found the answer. I just applied it to my report and it worked perfectly.

You need to next two rectangles inside one another. Apply the conditional formatting to the outside rectangle. Then apply the page break to the inside rectangle.

You have now separated the conditional formatting from the page break.

Since the inside rectangle is only visible when the conditional statement is true, it only applies the page break when it is visible.

Pretty neat. Wish I could take credit for figuring this one out.

Dennis Branson

Paddy1985 November 28th, 2007 08:50 AM

This is a great post. I was struggling with the same problem that's reported.

Thank you very much.


fly2ask December 14th, 2007 08:23 AM

I was also having the same problem. Now, I got it solved with the help of ur post. thank u.



with regards,

Bovaloe August 7th, 2009 04:23 PM

Quote:

Originally Posted by DLBranson (Post 206369)
You need to next two rectangles inside one another. Apply the conditional formatting to the outside rectangle. Then apply the page break to the inside rectangle.

So that's exactly what I tried before I hit the forums and it hasn't been working for me.

Any ideas? This is really frustrating.

Jonskin April 22nd, 2010 11:02 AM

I need to suppress PageBreak on 1st Page
 
Using a List Control my report outputs each record to a new page, as is required. I achieve the pagebreak with a Rectangle control.
The only thing is it throws a blank page at the beginning. Although this can be lived with it would be nice not to waste a page!
I can see how nested rectangles (visible expression etc) can be deployed to effect a conditional page break, but cannot find a way to detect the first page (or 1st dataset record), because Global variables are only available in the Header (or Footer).

Any ideas?

alikeita February 6th, 2012 05:31 AM

page break for a specific control!!
 
Hi,
I have a report on which countries names and their delegations will appear. However, on some pages, and at the end of the page, a country can stay alone when the members of the delegation are on the other page.
I tried Keep Together but didnít work, this because I want all countries to be continued but if one countryís name stays at the end of the page it will be forced to join its delegation members on the next page.
I tried also the conditional break based on a control specific value, but this one will break the page every time at the same place even if the country fits in the page.
Is there any thing that helps to count access report lines or controls per page so I can apply a code on it to break at a specific place of the page ?

thanks


All times are GMT -4. The time now is 07:54 AM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.