G
Guest
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
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