Can I get GroupHead to shrink?


N

Niklas Östergren

Hi!

I have some controls in group head section which sometimes have value and
sometimes don´t! When these control´s don´t have value I set the labels
visible propertie = False and each control have "Can shrink" propertie =
True.

The lables and the controls don´t show up on the report, that´s ok. But the
group section is still the sam size (height) as if the contros and lables
where visible.

Is there a way to minimize the size so only the controls visible are show´n?

I do have set visible propertie for grouphead to True.

TIA!
// Niklas
 
Ad

Advertisements

S

Steve Schapel

Niklas,

The Can Shrink property of the group header section itself has to be set
to Yes. Have you done this?
 
M

Marshall Barton

Niklas said:
I have some controls in group head section which sometimes have value and
sometimes don´t! When these control´s don´t have value I set the labels
visible propertie = False and each control have "Can shrink" propertie =
True.

The lables and the controls don´t show up on the report, that´s ok. But the
group section is still the sam size (height) as if the contros and lables
where visible.

Is there a way to minimize the size so only the controls visible are show´n?

I do have set visible propertie for grouphead to True.
 
M

Marshall Barton

Not enough information there to determine what you've done.
Here's some things to consider.

Both the controls and the section that they're in must have
CanShrink set before you'll see much of a difference.

Labels do not have a CanShrink property, so unattached
labels do not shrink regardless of their visibility.

If you make a text box invisible, its attached label control
will also become invisible.

Invisible text boxes and text boxes with a value of Null or
a ZLS ("") will shirnk.

A label attached to a text box with a value of Null or ZLS
will prevent shrinking unless the text box is made
invisible.

A horizontal band in the section that only contains a label
will not shrink, regardless of the label's visibility. The
horizontal band must have a shrinking text box and all
labels must be invisible before the band can be shrunk.
 
N

Niklas Östergren

OK!

I´ll try it out because I have two labels which are not attached to any
control and I have set them to visible = False and it seams that the they
might be the problem here! I´ll try it out and get back if I still have a
problem!

I´m sorry for the bad expleantion and lack of information but I did have set
CanShrink for the grouphead.

Thank´s !
// Niklas
 
N

Niklas Östergren

He, he! That was fast!

I DO have problem!
I try to create a control with attached lable in the grouphead section and
then try to move the control to the detail section. But the only thing that
happens is that group head section get´s bigger so the control still is in
the same section as it was created in.

The same thing happens with detail section if I create the control there and
then try to move the label to group section.

Is there a way to get around this? Because i´d like to have the control,
without label, in detail section and the lable in group head section.

Is this enough information for you or am I missing something here?

TIA!
// Niklas
 
Ad

Advertisements

S

Steve Schapel

Niklas,

You have to cut/paste the label to move it to the header.

By the way, relating to your earlier question, instead of toggling the
Visible property of a label, I normally use an unbound textbox, format
it to look like a label, set its Can Shrink to Yes, and put its Control
Source as...
=IIf(IsNull([MyDataField]),Null,"My label text")
 
M

Marshall Barton

Steve's trick is the usual way to do what you want, but
here's a different trick.

Add a text box to the group header in the same horizontal
band as the labels and make it the same height as the
tallest label. Set its CanShrink to Yes and its Control
Source expression to =Null. This text box will always
shrink and if all the labels are invisible, so will the
horizontal band.
 
N

Niklas Östergren

Great!

Thank´s a lot Steve! This was a nice one I´ll remeber this one!
Thank´s a lot for helping me out during a weekend to!

// Niklas


Steve Schapel said:
Niklas,

You have to cut/paste the label to move it to the header.

By the way, relating to your earlier question, instead of toggling the
Visible property of a label, I normally use an unbound textbox, format
it to look like a label, set its Can Shrink to Yes, and put its Control
Source as...
=IIf(IsNull([MyDataField]),Null,"My label text")

--
Steve Schapel, Microsoft Access MVP

He, he! That was fast!

I DO have problem!
I try to create a control with attached lable in the grouphead section and
then try to move the control to the detail section. But the only thing that
happens is that group head section get´s bigger so the control still is in
the same section as it was created in.

The same thing happens with detail section if I create the control there and
then try to move the label to group section.

Is there a way to get around this? Because i´d like to have the control,
without label, in detail section and the lable in group head section.

Is this enough information for you or am I missing something here?

TIA!
// Niklas
 
N

Niklas Östergren

Hi Marshall!

I don´t quit follow you here but I guess that it will becom clear if I try
it out, which I will a little later!
Thank´s for the tip and for helping me out I apreciate it!

// Niklas


Marshall Barton said:
Steve's trick is the usual way to do what you want, but
here's a different trick.

Add a text box to the group header in the same horizontal
band as the labels and make it the same height as the
tallest label. Set its CanShrink to Yes and its Control
Source expression to =Null. This text box will always
shrink and if all the labels are invisible, so will the
horizontal band.
--
Marsh
MVP [MS Access]



He, he! That was fast!

I DO have problem!
I try to create a control with attached lable in the grouphead section and
then try to move the control to the detail section. But the only thing that
happens is that group head section get´s bigger so the control still is in
the same section as it was created in.

The same thing happens with detail section if I create the control there and
then try to move the label to group section.

Is there a way to get around this? Because i´d like to have the control,
without label, in detail section and the lable in group head section.

But
the
 
N

Niklas Östergren

Still having problem with CanShrink propertie for the grouphead section!

Is there any other propertie I have to enable/disable to get the grouphead
section to shrink?

I have tryed to make the grouphead section verry large so I´ll be able to
see any difference but it doesn´t shrink at all. And I DO have enabled the
propertie CanShrink for the grouphead section.

What I´m saying is that if I set the height for the grouphead to 10 cm
instead of 2,5 which is neccesary I should be able to see if it hase shrink,
or?

It doesn´t!

TIA!
// Niklas
P.S I´ll be out for the day but I´ll be back later this eavning reading this
forum!

Steve Schapel said:
Niklas,

You have to cut/paste the label to move it to the header.

By the way, relating to your earlier question, instead of toggling the
Visible property of a label, I normally use an unbound textbox, format
it to look like a label, set its Can Shrink to Yes, and put its Control
Source as...
=IIf(IsNull([MyDataField]),Null,"My label text")

--
Steve Schapel, Microsoft Access MVP

He, he! That was fast!

I DO have problem!
I try to create a control with attached lable in the grouphead section and
then try to move the control to the detail section. But the only thing that
happens is that group head section get´s bigger so the control still is in
the same section as it was created in.

The same thing happens with detail section if I create the control there and
then try to move the label to group section.

Is there a way to get around this? Because i´d like to have the control,
without label, in detail section and the lable in group head section.

Is this enough information for you or am I missing something here?

TIA!
// Niklas
 
Ad

Advertisements

S

Steve Schapel

Sorry, Niklas, apart from what has already been mentioned, I can't think
of anything. Just check that I understand your situation...
The CanShrink property of the Group Header section is Yes.
There is a textbox in this section whose "value" is Null. (Are you
*absolutely sure* it is Null, as distinct from "" for example?)
The Can Shrink property of this textbox is set to Yes.
This textbox is not touching any other control.
There are no other controls or parts of controls on the same horizontal
level as any part of this textbox (... or if there are, they also are
Can Shrink = Yes and value is Null).
If my understanding of the above is not correct, please let us know. If
it is correct, I'm stumped!
 
N

Niklas Östergren

Yes, your understanding is, unfortunately, correct!

I even tryed with creating a complete new report, which the wizard, and
created a grouphead section in which I only placed 3 controls whith which I
didn´t do anything at all. I did let them be as after the wizard created the
report for me.

I added a single horisontal line which I places beneeth the 3 controls. I
also did set the CanShrink properti for the group head do "Yes" and
oversized the height for the grouphead (just like I did for the real report)
but it doesn´t shrink.

This test report have a table with 5 records as a recordsource. Just so I
can see any changes. That´s all to it.

I have the same "problem" with detail section as well! So here must be some
misstake I´m doing! I´m missing something out here, but I just can´t figure
out what! And I don´t have any good book´s about reports!

Thank´s for trying to help me out it´s apreciated. That´s for sure!

// Niklas
 
S

Steve Schapel

Niklas,

I am not sure of the reason for "oversizing" the report sections... this
will not affect the Shrinking behaviour, which only relates to the
height of the controls themselves. So these controls you put on the
report are taxtboxes? And they are all Null?
 
L

Larry Linson

Niklas, I cam late to this thread.

Can shrink does not, repeat not, shrink the white space between controls, it
only shrinks the area where the controls themselves are located. So if you
mean you had 3 lines with controls but just sized the Section to the larger
size, then those three lines might shrink away to nothing, but it might not
be obvious because of all the remaining white space.

Try with just the three controls, and a little, but very little, white space
between them.

Larry Linson
Microsoft Access MVP
 
N

Niklas Östergren

Hi!

I have been away at work for a couple of days but I´ll try what you suggest!
I´ll be back with my result asap.

Thank´s for helping out!

// Niklas
 
Ad

Advertisements

N

Niklas Östergren

OK!

I missunderstod the CanShrink behavor and thought that it actually could
shrink even the white space that wasn´t filled with any control´s.

Yes, I use textboxes AND one line as well. But I have removed that one to
try this out. And yes the value in the textboxes are Null not "".

Please don´t use to much time on this one untill I´ll get back. Because I
have to try it out what you and Larry said here! I´ll get back with my
result asap.

Thank´s a lot for helping out! It´s apreciated!

// Niklas
 
N

Niklas Östergren

Hi Steve!

I apologise for this but it does shrink! It was me that missunderstod the
behavor of propertie CanShrink and thought that even the white space would
shrink if there was noting on it!

It work´s! Thank´s a lot and I´ll try to be more specific when I have
problems in the future!

// Niklas
 
Ad

Advertisements

N

Niklas Östergren

Thank´s Larry!

It works! It was me that missunderstod the behavor of the propertie
CanShrink!

Thank´s for taking notice to my problem!

// Niklas
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Can Shrink 4
GroupHeader sizing 7
CAN SHRINK 1
Can Shrink 2
GroupHeader Repeat 3
Can Shrink 4
GroupHeader Repeat 0
Can grow...Can shrink 2

Top