Suppress blanks in Report

kmacd6951

Board Regular
Joined
Mar 3, 2004
Messages
58
I have a very basic report with one field per line.

Each field has it's properties set to YES for Can Grow and YES for Can Shrink - so that the text fills only the space it needs.
I have the properties on the DETAIL section also set to YES for Can Grow and Can Shrink.

I am still getting lots of chunks of white space for fields that are blank though.
There is nothing else formatted on each line, except the one field value.

What else could I be missing?

I want to only see text when something was entered - and not waste all this paper with the white spaces....
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
I do something somewhat similar you may be able to apply to your problem. I have a report with many different Group Header sections. However, if the value of the field is zero, I want to hide that Group Header section altogether.

In addition to setting the Can Grow and Can Shrink properties to Yes, I also add the following code to the On Format event:

Code:
Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)

If Me![AdminFee] = 0 Then
    Me.GroupHeader1.Visible = False
Else
    Me.GroupHeader1.Visible = True
End If

End Sub

Note: AdminFee is the name of my field.

You should be able to apply the same methodology to the Detail section.
 
Upvote 0
Hmmm...doesn't seem to be working for me (didn't change anything). I wonder if it is because my data fields are of data type 'memo' - so maybe when they are blank, it is not "0", but a different value?
 
Upvote 0

Forum statistics

Threads
1,223,493
Messages
6,172,606
Members
452,466
Latest member
Lynlindsay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top