Images are visible in Preview but do not Print.

G

Gino

I hope somebody can assist me with this problem.
In a report, I have some fixed text and two image controls.
The image controls correctly display the images in preview but, when
printing the report, only the text gets printed and the image frames are
totally blank.

The images get generated at preview runtime, by setting the image content to
the path/file information stored in me.JPGNo1 and me.JPGNo2.
I inserted the code, as shown below, at every level in the Details section,
but the images never get printed.
Any idea why. How can I solve the problem?

Thank you very much everybody for any suggestion.

____________________________________________________
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Image1.Picture = Me.JPGNo1
Me.Image2.Picture = Me.JPGNo2
End Sub

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.Image1.Picture = Me.JPGNo1
Me.Image2.Picture = Me.JPGNo2
End Sub

Private Sub Detail_Retreat()
Me.Image1.Picture = Me.JPGNo1
Me.Image2.Picture = Me.JPGNo2
End Sub
 
J

June7 via AccessMonster.com

Once a report starts to load cannot change or set the value or source
reference for objects, at least not directly. My method in many instances is
to send a value or several values delimited by comma to the report in the
OpenArgs argument of the OpenReport command. Then I use a function to extract
the value(s) from the OpenArgs. Textbox on the report has the function as
ControlSource.
 
J

June7 via AccessMonster.com

Edit my previous post.
Although how you can be seeing images in preview and not at print if some
image name is saved in the name property is unclear to me. My previous post
is based on experience with trying to set values for textboxes and subform
containers.
Once a report starts to load cannot change or set the value or source
reference for objects, at least not directly. My method in many instances is
to send a value or several values delimited by comma to the report in the
OpenArgs argument of the OpenReport command. Then I use a function to extract
the value(s) from the OpenArgs. Textbox on the report has the function as
ControlSource.
I hope somebody can assist me with this problem.
In a report, I have some fixed text and two image controls.
[quoted text clipped - 25 lines]
Me.Image2.Picture = Me.JPGNo2
End Sub
 
G

Gino

Thank you very much for your comments.
To clarify the issue further, the report source is a table that includes
fields JPGNo1 and JPGNo2. These fields contain the full path and file names
of the pictures I want to preview and print in my report. The report also has
some static text (title and comments).
Image1 and Image2 are the controls that receive the image location from the
two fields JPGNo1 and JPGNo2 with the following statements:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Image1.Picture = Me.JPGNo1
Me.Image2.Picture = Me.JPGNo2
End Sub

This works fine in preview and as I move from page to page the report
displays the correct pictures from start to end. However when I send to the
printer only the static text gets printed and the images are totally blank.

I put the same statements in other parts of the "report" and the "detail"
procedures (like onOpen -as I think you are suggesting- onPrint, onPage,
onRetreat, etc.) but no matter what, the images are correctly previewed but
never printed.

The printer works well with any other application so the problem must be
with Access or I am using the wrong controls or statements in the wrong place.
By the way, originally the file was Access 2000 loaded into Access 2003 but
even after converting the file system to Access 2003 the report print still
does not work.


_____________________________________________________________________
June7 via AccessMonster.com said:
Edit my previous post.
Although how you can be seeing images in preview and not at print if some
image name is saved in the name property is unclear to me. My previous post
is based on experience with trying to set values for textboxes and subform
containers.
Once a report starts to load cannot change or set the value or source
reference for objects, at least not directly. My method in many instances is
to send a value or several values delimited by comma to the report in the
OpenArgs argument of the OpenReport command. Then I use a function to extract
the value(s) from the OpenArgs. Textbox on the report has the function as
ControlSource.
I hope somebody can assist me with this problem.
In a report, I have some fixed text and two image controls.
[quoted text clipped - 25 lines]
Me.Image2.Picture = Me.JPGNo2
End Sub
 
J

June7 via AccessMonster.com

This was a new challenge for me. Never had images display dynamically before.
But I had a sample database perfect to try it in. I used the ControlSource
property of the Image boxes. No VBA coding and Picture property set to none.
Wow, it worked! Pictures display in preview and printed.
Thank you very much for your comments.
To clarify the issue further, the report source is a table that includes
fields JPGNo1 and JPGNo2. These fields contain the full path and file names
of the pictures I want to preview and print in my report. The report also has
some static text (title and comments).
Image1 and Image2 are the controls that receive the image location from the
two fields JPGNo1 and JPGNo2 with the following statements:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Image1.Picture = Me.JPGNo1
Me.Image2.Picture = Me.JPGNo2
End Sub

This works fine in preview and as I move from page to page the report
displays the correct pictures from start to end. However when I send to the
printer only the static text gets printed and the images are totally blank.

I put the same statements in other parts of the "report" and the "detail"
procedures (like onOpen -as I think you are suggesting- onPrint, onPage,
onRetreat, etc.) but no matter what, the images are correctly previewed but
never printed.

The printer works well with any other application so the problem must be
with Access or I am using the wrong controls or statements in the wrong place.
By the way, originally the file was Access 2000 loaded into Access 2003 but
even after converting the file system to Access 2003 the report print still
does not work.

_____________________________________________________________________
Edit my previous post.
Although how you can be seeing images in preview and not at print if some
[quoted text clipped - 14 lines]
 
G

Gino

Thank you for following up.
The problem in my case (within Access 2003 on my PCs) is that the image
controls do not have a control source property that I can set to a field and
that is why -to display the images- I had to use the code I described in my
initial posting.

I have now tried Access 2007 and the image control HAS a control source. I
set it ito my field JPGNo1 and JPGNo2 and, as you say, images display and
print with no code being necessary.

I am not sure if the version of Access are actually different or if my
installation is corrupt and so I have now posted the question about the image
control under the General Access Questions.
________________________________________________


June7 via AccessMonster.com said:
This was a new challenge for me. Never had images display dynamically before.
But I had a sample database perfect to try it in. I used the ControlSource
property of the Image boxes. No VBA coding and Picture property set to none.
Wow, it worked! Pictures display in preview and printed.
Thank you very much for your comments.
To clarify the issue further, the report source is a table that includes
fields JPGNo1 and JPGNo2. These fields contain the full path and file names
of the pictures I want to preview and print in my report. The report also has
some static text (title and comments).
Image1 and Image2 are the controls that receive the image location from the
two fields JPGNo1 and JPGNo2 with the following statements:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Image1.Picture = Me.JPGNo1
Me.Image2.Picture = Me.JPGNo2
End Sub

This works fine in preview and as I move from page to page the report
displays the correct pictures from start to end. However when I send to the
printer only the static text gets printed and the images are totally blank.

I put the same statements in other parts of the "report" and the "detail"
procedures (like onOpen -as I think you are suggesting- onPrint, onPage,
onRetreat, etc.) but no matter what, the images are correctly previewed but
never printed.

The printer works well with any other application so the problem must be
with Access or I am using the wrong controls or statements in the wrong place.
By the way, originally the file was Access 2000 loaded into Access 2003 but
even after converting the file system to Access 2003 the report print still
does not work.

_____________________________________________________________________
Edit my previous post.
Although how you can be seeing images in preview and not at print if some
[quoted text clipped - 14 lines]
Me.Image2.Picture = Me.JPGNo2
End Sub
 
J

June7 via AccessMonster.com

Sorry, should have noted I was in version 2007. Sounds like must be an new
feature. As I said, had never tried, so can't say if 2003 never had it.
Thank you for following up.
The problem in my case (within Access 2003 on my PCs) is that the image
controls do not have a control source property that I can set to a field and
that is why -to display the images- I had to use the code I described in my
initial posting.

I have now tried Access 2007 and the image control HAS a control source. I
set it ito my field JPGNo1 and JPGNo2 and, as you say, images display and
print with no code being necessary.

I am not sure if the version of Access are actually different or if my
installation is corrupt and so I have now posted the question about the image
control under the General Access Questions.
________________________________________________
This was a new challenge for me. Never had images display dynamically before.
But I had a sample database perfect to try it in. I used the ControlSource
[quoted text clipped - 36 lines]
 
J

June7 via AccessMonster.com

Unfortunately, I no longer have Access2003 so can't offer to have you provide
me the file for debugging. Apparently, 2007 has enhanced image handling. I
just assisted someone else with similar issue. Used image control
ControlSource property which I am told was not available in 2003.
Thank you very much for your comments.
To clarify the issue further, the report source is a table that includes
fields JPGNo1 and JPGNo2. These fields contain the full path and file names
of the pictures I want to preview and print in my report. The report also has
some static text (title and comments).
Image1 and Image2 are the controls that receive the image location from the
two fields JPGNo1 and JPGNo2 with the following statements:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Image1.Picture = Me.JPGNo1
Me.Image2.Picture = Me.JPGNo2
End Sub

This works fine in preview and as I move from page to page the report
displays the correct pictures from start to end. However when I send to the
printer only the static text gets printed and the images are totally blank.

I put the same statements in other parts of the "report" and the "detail"
procedures (like onOpen -as I think you are suggesting- onPrint, onPage,
onRetreat, etc.) but no matter what, the images are correctly previewed but
never printed.

The printer works well with any other application so the problem must be
with Access or I am using the wrong controls or statements in the wrong place.
By the way, originally the file was Access 2000 loaded into Access 2003 but
even after converting the file system to Access 2003 the report print still
does not work.

_____________________________________________________________________
Edit my previous post.
Although how you can be seeing images in preview and not at print if some
[quoted text clipped - 14 lines]
 
J

June7 via AccessMonster.com

Edit previous post: Looks like we already hashed this out and I lost track.
Disregard.
June7 said:
Unfortunately, I no longer have Access2003 so can't offer to have you provide
me the file for debugging. Apparently, 2007 has enhanced image handling. I
just assisted someone else with similar issue. Used image control
ControlSource property which I am told was not available in 2003.
Thank you very much for your comments.
To clarify the issue further, the report source is a table that includes
[quoted text clipped - 31 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top