Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A condition on the hidden property over writes the pagebreak at end

Status
Not open for further replies.

Linda224

Programmer
Dec 6, 2006
80
US
Hello
I have a report with multiple sub reports. The sub report all need to show up on a new page so when it exports to excel they are all in different tabs

The sub reports are all grouped in a list and then each one is in a rectangle. The rectangle is there for the page break at end.

This works perfect except when I want to show only one of the sub reports. If the 5th sub report is chosen then there will be 4 blank pages before the 1st page of the 5th report.

I put a conditional statement on the hidden property of the rectangle and this works but it over writes the page break at end property and then the subreports all show on the same page again.

Any suggestions?
Thank you
 
I have the page break on the rectangle.

it is structured like this:

Main Report
List
Rectangle1 - PageBreakAtEnd
Subreport1
Rectangle2 - PageBreakAtEnd
Subreport2
Rectangle3 - PageBreakAtEnd
Subreport3


also I have on the Rectangles hidden property
=IIF(Fields!TableName.Value = "Subreport1", False, True)

I put this there because without it there will be 1 blank page when subreport2 is chosen and so on.




 
OK, so are you only showing Subreport1, but multiple times; or Subreport2, but multiple times?

Is this how you want it?

Code:
Data from main report
[i]<page break>[/i]
  Rectangle/Some SubReport
[i]<page break>[/i]
Data from main report
[i]<page break>[/i]
  Rectangle/Some SubReport
[i]<page break>[/i]
 
Each SubReport is a different report

The main report can pull all reports or just one
If all reports are shown they all need to be on different pages. This part works.

If one report is chosen then all other reports need to be hidden. This is where the issue is.

The Main report only has the header info in it and only shows up once.

so its more like this:

Data from main report
Rectangle/Some SubReport1
<page break>
Rectangle/Some SubReport2
<page break>

I have a total of 34 reports in this so if the 34th report is chosen there are 33 blank pages before it or if i chose the 1st report there are 33 blank pages after

By putting the condition on the hidden property of the rectangle works and if i chose a subreport all the blank pages are gone but then all of my page breaks are gone as well
 
OK, so anywhere between 1 and 35 subreports may be shown, and they are each shown at most once.

What happens if you try setting it to a page break before instead of after?
 
Well only 1 or all 35 subreports are shown and only once each

if I set the page break before then I would get a blank page before the report and that is what i am trying to avoid.
But either way ssrs does not see the page break if i have a condition on the hidden property
 
What I am looking for is for all subreports to show up and have a page break at the end of each one and if only one subreport is chosen show the one that is chosen with out all the other page breaks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top