Connecting Tech Pros Worldwide Forums | Help | Site Map

reports question

ken
Guest
 
Posts: n/a
#1: Nov 13 '05
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


Justin Hoffman
Guest
 
Posts: n/a
#2: Nov 13 '05

re: reports question


"ken" <gevayl@gmail.com> wrote in message
news:1117920124.288967.292260@g49g2000cwa.googlegr oups.com...[color=blue]
> 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[/color]

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.


ken
Guest
 
Posts: n/a
#3: Nov 13 '05

re: reports question


Nope...it can't shrink to zero! Besides it shrinks objects not the
detail section itself.

ken
Guest
 
Posts: n/a
#4: Nov 13 '05

re: reports question


ok...nevermind...detail section has a shrink policy...investigating...

ken
Guest
 
Posts: n/a
#5: Nov 13 '05

re: reports question


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?

ken
Guest
 
Posts: n/a
#6: Nov 13 '05

re: reports question


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...

Justin Hoffman
Guest
 
Posts: n/a
#7: Nov 13 '05

re: reports question


"ken" <gevayl@gmail.com> wrote in message
news:1117921761.512260.199360@o13g2000cwo.googlegr oups.com...[color=blue]
> 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?[/color]

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.


ken
Guest
 
Posts: n/a
#8: Nov 13 '05

re: reports question


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.

ken
Guest
 
Posts: n/a
#9: Nov 13 '05

re: reports question


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.

Justin Hoffman
Guest
 
Posts: n/a
#10: Nov 13 '05

re: reports question


"ken" <gevayl@gmail.com> wrote in message
news:1117924907.393401.151630@z14g2000cwz.googlegr oups.com...[color=blue]
> 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.[/color]

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.


ken
Guest
 
Posts: n/a
#11: Nov 13 '05

re: reports question


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...

Salad
Guest
 
Posts: n/a
#12: Nov 13 '05

re: reports question


ken wrote:[color=blue]
> 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...
>[/color]
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
Closed Thread