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

Pictures in Access Reports

P: n/a
Access 2000

I am trying to print a report that only some of the records have
pictures. When the report prints, I do not want a blank image control
showing on the report. This project is a test bank of questions
allowing the user to create an exam by choosing the questions. Some
of the questions have pictures for reference and some don't.

I have chosen to keep the images in another folder with a test field
(QPic) that contains the complete path to the image. There is a
control in the detail section of the report (QPic) that contains this
path. The detail OnPrint section contains the following code:

If Not IsNull(Me!QPIC) Then
Me!imgEKG.Picture = Me!QPIC
End If

This works for displaying the images but if the question does not have
an image associated with it, the there is a blank image control
printed.

Since image controls can not "shrink", How can i print this report
(Exam) so that it does not have blank image controls?

Thanks

Dale
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 26 Nov 2003 14:04:35 -0800, mt****@yadtel.net (Dale Ring) wrote:
Access 2000

I am trying to print a report that only some of the records have
pictures. When the report prints, I do not want a blank image control
showing on the report. This project is a test bank of questions
allowing the user to create an exam by choosing the questions. Some
of the questions have pictures for reference and some don't.

I have chosen to keep the images in another folder with a test field
(QPic) that contains the complete path to the image. There is a
control in the detail section of the report (QPic) that contains this
path. The detail OnPrint section contains the following code:

If Not IsNull(Me!QPIC) Then
Me!imgEKG.Picture = Me!QPIC
End If

This works for displaying the images but if the question does not have
an image associated with it, the there is a blank image control
printed.

Since image controls can not "shrink", How can i print this report
(Exam) so that it does not have blank image controls?

Dale, use its Visible property.

If Not IsNull(Me!QPIC) Then
Me.imgEKG.Visible = True
Me!imgEKG.Picture = Me!QPIC
Else
Me.imgEKG.Visible = False
End If
- Jim

Nov 12 '05 #2

P: n/a
"Jim Allensworth" <ji****@Notdatacentricsolutions.com> wrote in message news:<3f****************@news.west.earthlink.net>. ..
On 26 Nov 2003 14:04:35 -0800, mt****@yadtel.net (Dale Ring) wrote:
Access 2000

I am trying to print a report that only some of the records have
pictures. When the report prints, I do not want a blank image control
showing on the report. This project is a test bank of questions
allowing the user to create an exam by choosing the questions. Some
of the questions have pictures for reference and some don't.

I have chosen to keep the images in another folder with a test field
(QPic) that contains the complete path to the image. There is a
control in the detail section of the report (QPic) that contains this
path. The detail OnPrint section contains the following code:

If Not IsNull(Me!QPIC) Then
Me!imgEKG.Picture = Me!QPIC
End If

This works for displaying the images but if the question does not have
an image associated with it, the there is a blank image control
printed.

Since image controls can not "shrink", How can i print this report
(Exam) so that it does not have blank image controls?

Dale, use its Visible property.

If Not IsNull(Me!QPIC) Then
Me.imgEKG.Visible = True
Me!imgEKG.Picture = Me!QPIC
Else
Me.imgEKG.Visible = False
End If
- Jim

Thanks Jim, Great Idea!

However, this method still leaves a large blank area beneath the
question. What I need is to not have this wasted space so that the
report is more compact. There may be 5 questions that do not have
images associated with them and 5 questions that do. In this case
(with the wasted space) the report would 5 pages to print with only 2
questions per page. Without the wasted space this could be reduced to
3 pages. This would make a major difference when the exam is 100 or
150 questions.

I recall seeing a post or article about using something other than an
image control in a report to display an image. I recall that this
method did use the "shrink" property and that would resolve my issue.

However I can't locate the post or article now. It's that thing about
when you need it most, you can't find it!

Thanks
Dale
Nov 12 '05 #3

P: n/a
I'm not sure if this will work but if you can set the visible property
can you not set the height property?

If Not IsNull(Me!QPIC) Then
Me.imgEKG.Visible = True
Me!imgEKG.Picture = Me!QPIC
Else
Me.imgEKG.Visible = False
Me.imgEKG.Height = 0
End If

Neil
Nov 12 '05 #4

P: 1
I too am having exactly the problems as the above person. Has anyone found an answer ?

I have a product database and print tailored quotations for products extracted from that database. Some of the products have pictures. I can easily say "make the image visible only if there is one" and "make the height of the image very small if there is no image and large if there is an image"

But annoyingly, even if the image height is very small and/or if it is not visible, there is a large white space left in the report the size that there would be if there was an image.

I have set the section of my report to "can shrink" and tried everything I can think of but nothing works.

So close yet so far....

Please help !

nick
Jun 28 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.