giannisg5
asked on
Changing image width and height in CR8.5
I have upload in a MSSql server database all the images I need, I have connected the table with CR8.5 (ODBC) and I am displaying images on my report. However, all images are displayed with the original image width & height, resulting in stretching. is there anyway to set the width and height properties of the blob field while printing records?
thank you
thank you
ASKER
How do you know which image box to display? Do you suppress the rest?
I don't recall the exact solution or how the suppression was done.
Yes, you use conditional suppression based on a field in the database. Perhaps the image name?
mlmcc
Yes, you use conditional suppression based on a field in the database. Perhaps the image name?
mlmcc
ASKER
I used vb6 and the cr85 designer in order to determine the width and height of the image. I know on which section the OLE object is and which index it is, however I cannot find how to set the width and height. Can you help?
Private Sub sect_Format(ByVal pFormattingInfo As Object)
Dim bmp As StdPicture
With sect.ReportObjects
Set .Item(2).FormattedPicture = LoadPicture(App.Path & "\111.jpg") 'default
If FileExists(App.Path & "\" & .Item(1).Value & ".jpg") Then
If .Item(1).Value <> "" Then
Set bmp = LoadPicture(App.Path & "\" & .Item(1).Value & ".jpg")
Set .Item(2).FormattedPicture = bmp
End If
End If
End With
End Sub
if the section i want to access is on a subreport, how to you reference that?
thank you
Private Sub sect_Format(ByVal pFormattingInfo As Object)
Dim bmp As StdPicture
With sect.ReportObjects
Set .Item(2).FormattedPicture = LoadPicture(App.Path & "\111.jpg") 'default
If FileExists(App.Path & "\" & .Item(1).Value & ".jpg") Then
If .Item(1).Value <> "" Then
Set bmp = LoadPicture(App.Path & "\" & .Item(1).Value & ".jpg")
Set .Item(2).FormattedPicture = bmp
End If
End If
End With
End Sub
if the section i want to access is on a subreport, how to you reference that?
thank you
You might try using the Format event of the report or section.
To get at a subreport you open the subreport as a report then reference it as a report.
mlmcc
To get at a subreport you open the subreport as a report then reference it as a report.
mlmcc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The only solution seems to be to put several images boxes on the screen of different sizes and show the one you need for the particular image.
mlmcc