By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

reports question

P: n/a
ken
Lets say you have a report of 20 rows. 5 of those rows don't have data.
Therefore the report will have blanks for those rows. Oh and the rows
are in the detail section. I was wondering if there is a way to get rid
of a detail section if its "detail" data is blank.

Thanks

Nov 13 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
"ken" <ge****@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Lets say you have a report of 20 rows. 5 of those rows don't have data.
Therefore the report will have blanks for those rows. Oh and the rows
are in the detail section. I was wondering if there is a way to get rid
of a detail section if its "detail" data is blank.

Thanks


Check out the CanShrink property. You can set this separately for the
detail section and the textboxes on it, but typically you set it to true for
both.
Nov 13 '05 #2

P: n/a
ken
Nope...it can't shrink to zero! Besides it shrinks objects not the
detail section itself.

Nov 13 '05 #3

P: n/a
ken
ok...nevermind...detail section has a shrink policy...investigating...

Nov 13 '05 #4

P: n/a
ken
ok the shrink property workssort of. I have 2 label boxes as a result
of them I can't get the detail section to go away. If I delete the
labels the detail shrinks. I tried setting the visible property of the
labels to false but that did not help? Maybe I have to set another
property?

Nov 13 '05 #5

P: n/a
ken
Ok..I deleted everything in the detail section. Its blank now, but
there is a 1/4 inch hight of the detail section, but no text or other
objects inside. Even though I set the can shrink property of the detail
to true, I still get # of 1/4 inch lines in my report. I can tell
because I have a marker on the report footer...
Clearly the detail section is not being shrunk...

Nov 13 '05 #6

P: n/a
"ken" <ge****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
ok the shrink property workssort of. I have 2 label boxes as a result
of them I can't get the detail section to go away. If I delete the
labels the detail shrinks. I tried setting the visible property of the
labels to false but that did not help? Maybe I have to set another
property?


Some things may intefere with the shrinking you had hoped for - you have
just found one, other examples include the one below:

Address1 Tel
Address2 Fax
Town

where you want the address to 'bunch up', so if there is only one address
line, the town should appear immediately below Address line1, but if there
is a fax number, the address as a whole cannot shrink.

In the example above, you might place the address on a subform, but in
yours, the answer may be to delete the labels and change the control source
of the textbox, e.g.

=IIF(IsNull(FirstName),Null,"First Name: " & [FirstName])

This means the textbox 'displays it's own label' and so does not need a real
label.
Nov 13 '05 #7

P: n/a
ken
Well I made a veri simple report. I have a detail section that is
blank...but its hight is say half an inch. There is nothing there
however. Then I have a report footer with a line. I have 6 detail
records, but since I did not put any bound/unbound objects or any
objects in the detail section, everything is blank. Now the canshring
property is set to yes for the detail. So when I press report preview,
I expect the line in the footer of the report to be on top of the page,
but its not. Its in the middle. Therefore even though my detail
section is NULL/Blank, access does not shrink it because if it did I
would see my report footer debug line on top of the page.

Nov 13 '05 #8

P: n/a
ken
to clarify previous post...the 6 detail records refer to a column and
its 6 rows in the table that the report is bound to.

Nov 13 '05 #9

P: n/a
"ken" <ge****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Well I made a veri simple report. I have a detail section that is
blank...but its hight is say half an inch. There is nothing there
however. Then I have a report footer with a line. I have 6 detail
records, but since I did not put any bound/unbound objects or any
objects in the detail section, everything is blank. Now the canshring
property is set to yes for the detail. So when I press report preview,
I expect the line in the footer of the report to be on top of the page,
but its not. Its in the middle. Therefore even though my detail
section is NULL/Blank, access does not shrink it because if it did I
would see my report footer debug line on top of the page.


Have you looked in the help file under CanShrink? See what it says about
reducing the space occupied by controls - in other words if you have no
controls in you detail section then, it would not shrink even though I can
understand why you expected it would.
Nov 13 '05 #10

P: n/a
ken
ok..I think I got it. Thanks Justin for walking me through this. Its so
stupid the way they set it up. Basically if you have a control that is
set to shrink, it will take out that "line" that the controll is out
provided you set the canshrink of detail to yes. So if Canshrink of
detail is yes then the canshrinks of objects inside detail will shrink.
Otherwise not. Anotherwords the canshrink of detail is bogus. Its just
an on/off switch to controll all the canshrinks of the stuff that's
inside detail...

Nov 13 '05 #11

P: n/a
ken wrote:
ok..I think I got it. Thanks Justin for walking me through this. Its so
stupid the way they set it up. Basically if you have a control that is
set to shrink, it will take out that "line" that the controll is out
provided you set the canshrink of detail to yes. So if Canshrink of
detail is yes then the canshrinks of objects inside detail will shrink.
Otherwise not. Anotherwords the canshrink of detail is bogus. Its just
an on/off switch to controll all the canshrinks of the stuff that's
inside detail...

You can also use MoveLayout, NextRecord, PrintSection (see help and view
example) to move to next record if blank and setting PrintSection to
False if blank, and MoveLayout to False.
Those 3 options are very powerful. You normally don't need them often,
but when you do they certainly are useful
Nov 13 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.