Image shows on report preview, but not in normal mode. Why?

M

Mark

I have a report that contains an image control. That control's image changes
depending on the value of a field on the report itself.

When the report is set to preview mode the images change as intended, but
when I try to send this same report directly to the printer the image is not
on the report.

I find it disconcerting that I can print the report with the image on it if
I use preview mode, but I can't print the image on the report if I go
directly to the printer.

Why is this happening and what can I do to solve it.

Report code:
Option Compare Database
Option Explicit

Private Sub Report_Activate()
Select Case Me.BusinessUnitID
Case 1
Me.imgLogo.Picture = Application.CurrentProject.Path &
"\am_header_4.05.bmp"
Case 2
Me.imgLogo.Picture = Application.CurrentProject.Path &
"\pbm_header_4.05.bmp"
End Select
End Sub

Private Sub Report_NoData(Cancel As Integer)
Cancel = MsgBox("No Records Found", vbInformation, Me.Caption)
End Sub

Private Sub Report_Open(Cancel As Integer)
On Error GoTo Report_Open_Err
Me.BusinessUnitID.Visible = False
Me.Report.RecordSource = Rpt_strSQL()

Report_Open_Exit:
Exit Sub

Report_Open_Err:
Msg = Err.Description
MsgBox Msg, , "Report_Open"
Resume Report_Open_Exit
End Sub
 
M

Mark

I have found the solution. Place the code which currently resides in the
Report_Activate event and place it in the ReportHeader_Print event.

It works like I intened.
 

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