How to hide items in reports

darkmastergyz

Registered User.
Local time
Today, 11:03
Joined
May 7, 2006
Messages
85
I'm trying to hide an image on the report, but when I do, in the preview, it gives me a lot of empty space. Is there any way which I can hide or remove the empty space? I know for text boxes, there's a property: can shrink = yes, but it seems that's not available for images. Each of my images takes up a whole page(always), so if I can hide a page in a report, that would also work great. Thanks!
 
At a guess, include the pictures in a sub-report because it will shrink/grow as required.

Pete.
 
Hi,

As you have said it yourself, “I know for text boxes, there's a property: can shrink = yes”. Now the question is “How to use the textbox “Can Shrink” property to reduce empty space?

Let’s take an example…pseudo code.

Private Sub Report_Open(Cancel As Integer)
‘assume nothing in text box
If Text0.ControlSource = “” Then
‘then make image invisible to reduce space
Me.Image5.Visible = False
End If
End Sub

Create a sample of a report to demonstrate this before jumping into a real report.

The text box must be in the same line as the image box for this to work.
1. Create a image box, size - one inch by one inch
2. Create a text box, size – one inch by one inch
3. Leave the Text box Control Source empty
4. Create two lines, one above the image and text box. Leaving a small space between the image/text box and the line.
5. And one line below the image/text box, same as above position and spacing.

The purpose of the line is to demonstrate this technique by using the textbox “Can Shrink” property to reduce space. If the text box is empty, the can shrink property is now active and at the same time make the image invisible thereby reduce the space between the Top line and the bottom line.

I'm trying to hide an image on the report, but when I do, in the preview, it gives me a lot of empty space. Is there any way which I can hide or remove the empty space? I know for text boxes, there's a property: can shrink = yes, but it seems that's not available for images. Each of my images takes up a whole page(always), so if I can hide a page in a report, that would also work great. Thanks!
 

Users who are viewing this thread

Back
Top Bottom