Changing each image size in my report (1 Viewer)

oxicottin

Learning by pecking away....
Local time
Today, 00:27
Joined
Jun 26, 2007
Messages
856
Hello, I have a report with a subreport. This subreport has 3 text boxes that can grow and they are stacked vertical ontop each other. Next to the 3 growing text boxes I have a image box that uses images linked to a folder. I cant figure out how to get each image box to fit its images height and width but not go over 300px X 300px. wether it the image
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:27
Joined
Oct 29, 2018
Messages
21,467
Hi. Not sure I understand but have you tried using Zoom for the view setting?
 

oxicottin

Learning by pecking away....
Local time
Today, 00:27
Joined
Jun 26, 2007
Messages
856
Ok I will try to explain better... If you see in the image my pictures are small compared to its frame. I am already using Zoom but im using line method. My pictures are all around 400px wide and 300px height and my 3 text boxes next to my image are set to can grow. I want the imgbox to fit the 2.3313" I have set for the boxes width and whatever the height ends up.

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not IsNull(Me.txtUnboundImagePath) Then
Me.imgJobStep.Top = 50
Me.imgJobStep.Height = 1275
          End If

End Sub

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)


'****************************Replaces picture with default image if you dont have a picture
'Gets path of current DB in module
If DCount("[JobStepID]", "tbl_JobSteps", "[ImagePath]=""" & txtImagePath & """") > 0 Then
Me!imgJobStep.Picture = GetCurrentPath() & "/VWI_Images/imgDefault.jpg"
End If

Dim CtlDetail As Control
Dim intLineMargin As Integer

' This is the spacing between the right edge of the control and the Vertical Seperation Line
intLineMargin = 60

' OK lets draw a vertical line to seperate each field
' for each control in details control
' If your last control on the right does not end on the edge of the section
' you will get a second vertical line. If you need to get around this then you
' can skip drawing this last Vertical Seperation Line in a couple of ways.
' We'll use the control name method Here. Our right most control is named
' TestMemo. IF current control is TestMemo - Do not print Vertical Line

For Each CtlDetail In Me.Section(acDetail).Controls
If CtlDetail.Visible = True Then 'Added
With CtlDetail
Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)
'End If
End With 'Added
End If
Next

        'While we are here lets draw a box around the Detail section
With Me
Me.Line (0, 0)-Step(.Width, .Height), 0, B
    End With

Set CtlDetail = Nothing

End Sub
 

Attachments

  • Untitled.png
    Untitled.png
    63.2 KB · Views: 181

Users who are viewing this thread

Top Bottom