Showing posts with label canshrink. Show all posts
Showing posts with label canshrink. Show all posts

Monday, March 19, 2012

CanShrink=True doesnt work

I have added to detail rows to my table and set the canshrink property to
them all to be =True.
I only use one field in each row, and if there is no value in that field you
would think it would shrink the whole row to nothing. It keeps the row
there and takes up the space of the whole row.
Has anyone else seen this or have any idea why CanShrink does not work.?Did you ever find a solution to this? I have the same problem. I have a
matrix control that has the potential to have four rows per group. However,
depending on the group I only want to show some rows and not others. I'm
able to hide the values in the rows, but I can't hide the row.
Thanks!
Ian

CanShrink Question

Hello all,

I have a report with a dataset similar to this:

description0 35
description1 0
description2 0
description3 0
description4 0
description5 45
description6 0
description7 0
description8 50
description9 10
.....

I don't care to see the records with a zero numeric value so I've configured the two text boxes the list box to set their values to "nothing" if the numeric value is 0. I've also configured both text boxes canshrink property to true.

When the report renders, I get this:

desc. header numeric header
--
description0 35

description5 45

description8 50
description9 10
....

I get one blank line where the grouping of 0 valued numeric records are. That tells me the canshrink is working, somewhat. What I'm confused about is why the blank line and what I need to stuff into the text box value.

In this particular case, I can go back to the db stored proc and just omit the 0 valued records. But, that doesn't help me if I run into a situation where I don't have that option.

Any help would be appreciated,

Thanks in advance,

Greg Wilkerson

Well, I need to add something. I deployed this report and the can shrink does not work in the deployed version. Through BIDS, it works as described above.

Greg

|||Hi Greg.

I didn't fully understand the question but from what I understod - may be instead of changing the "canshrink" property you should try and change the "visibility" property if the value is zero (Also, you can try and change the width or height of the cells).

Good luck,
Roy.|||

Roy,

You understood things fine. The visibility settings did work out fine, and is a pretty clean implementation. I thought I had tried that in an earlier attempt but I guess didn't get something right. I'm going to have to figure out the intracacies of this canshrink property. And, this rendering differently in BIDS vs. the deployed report is troublesome.

But, I'll figure it out.

Thanks.

CanShrink property

I'm confused about this property. I have a textbox that I want to appear
under certain conditions. If it's not visible, won't it shrink as well if I
set the property? Thanks!Yes.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Richard Wrench" <rwrench@.icsecurity.com> wrote in message
news:%23zZmUD4YEHA.2344@.TK2MSFTNGP11.phx.gbl...
> I'm confused about this property. I have a textbox that I want to appear
> under certain conditions. If it's not visible, won't it shrink as well if
I
> set the property? Thanks!
>|||But it doesn't - why?
"Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
news:%23lblCxEZEHA.2480@.tk2msftngp13.phx.gbl...
> Yes.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Richard Wrench" <rwrench@.icsecurity.com> wrote in message
> news:%23zZmUD4YEHA.2344@.TK2MSFTNGP11.phx.gbl...
> > I'm confused about this property. I have a textbox that I want to
appear
> > under certain conditions. If it's not visible, won't it shrink as well
if
> I
> > set the property? Thanks!
> >
> >
>|||To clarify further, if the Hidden property of the textbox is a constant
(say, always true), the textbox won't collapse. On the other hand, if the
Hidden property of the textbox is an expression like following:
=iif(ReportItems!textbox3.Value = "Test", true, false)
then the space occupied by the textbox will be collapsed when the expression
evaluates to true. This is regardless of the CanShrink property.
Note that CanShrink property only applies to height, not width - it
indicates whether the height of a textbox can decrease according to its
content.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Richard Wrench" <rwrench@.icsecurity.com> wrote in message
news:epVsYkSZEHA.2816@.TK2MSFTNGP11.phx.gbl...
> But it doesn't - why?
> "Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
> news:%23lblCxEZEHA.2480@.tk2msftngp13.phx.gbl...
> > Yes.
> >
> > --
> > Ravi Mumulla (Microsoft)
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > "Richard Wrench" <rwrench@.icsecurity.com> wrote in message
> > news:%23zZmUD4YEHA.2344@.TK2MSFTNGP11.phx.gbl...
> > > I'm confused about this property. I have a textbox that I want to
> appear
> > > under certain conditions. If it's not visible, won't it shrink as well
> if
> > I
> > > set the property? Thanks!
> > >
> > >
> >
> >
>