Deleting blank spaces due to hidden subreports

来源:http://www.imcoder.org/report/192723.htm

 

Q:

Hello all,

I am working on SSRS, SQL2005, VB.Net 2.0 

I am using a report (Main.rdl) in which I have included a few subreports. Those subreports are displayed or hidden according to parameters.

The whole thing works but I have got a littele issue with all this.

Indeed, even though subreports are hidden, I do not manage to delete the blank space that is used by hidden subreports.

Have you got any on idea to solve this ?

 

Thanks 

A:

Please See:
How to supress the subreport when there is not data

A:

 Thanks for the link.

I've tried to include subreports in rectangles as I read in the link you posted.

Then I try to set these rectangles visibility thanks to a boolean parameter.

I still get an issue: if I choose to hide the first rectangle, then other also are even though the hidden property is True. This means that if the first rectangle is hidden, rectangles down it won't be displayed.

Isn't there any solution to bypass this strange behavior ?

 

Thanks for your help.
 

A:

 

you are welcome 

I do not get what you mean. Please give me more details, and please if the previous post helps you mark it as answer

thanks

A:

 Thanks again for answering and please excuse my bad english !

What I wanted to explain is that despite I tried to apply what's written in the link you gave me, I did not manage to solve my issue.

Indeed, in my main report, I have included 3 rectangles (r1, r2, r3) . In each of them, I placed a subreport (sr1, sr2, sr3).

I use boolean expressions to set the rectangles' visibility.

And, if r1 (the first subreport) is hidden (hidden=True), then the other rectangles (r2 and r3) also are hidden, even though I set hidden=false. They should normally be visible but they aren't.

However, if the first rectangle is visible (hidden=false) then r2 and r3 are visible.

I wish I was clearer ;)

A:

I think the main idea is to include your subreport in rectangles
then you can set the visibility of your rectangles by using your parameters instead of subreport

I am not sure but it seems that you used a shared method for all rectangles

 if you can use your parameters do not use methods

thanks

and I also have bad english

A:

I do not understand the difference you make between "parameter" and "method".

Each subreport has been included into a rectangle and each rectangle has got a boolean parameter that I use to set its visibility.

In my code page,  I only have a method thanks to which I give my report a collection of parameters (again one for each rectangle).

I really don't see what I am missing. 

posted @ 2008-08-12 21:27  KK in cnblog  阅读(207)  评论(0编辑  收藏  举报