Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Dynamic Image Not Sized Properly

Dynamic Image Not Sized Properly

Dynamic Image Not Sized Properly

I have VB6 application that uses the Crystal Reports 8.5 CRAXDRT.  I am dynamically loading an image at runtime.  The code below works great and does load the image.  The problem, however, is that the image (jpg) is not sized properly.  The jpg images that I am dynamically loading are of different sizes, so setting the image .Height and .Width in code is not helping.  How do I get a dynamically-loaded image to be properly sized in Crystal Reports?

Any assistance is appreciated.

Dim crApplication As New craxdrt.Application
Dim crReport As craxdrt.Report
Dim WithEvents crReportHeaderSection As craxdrt.Section

Set crReport = crApplication.OpenReport("C:\MyReport.rpt")
crReport.Database.Tables(1).SetDataSource rstMyData, 3

Set crReportHeaderSection = crReport.Sections("RH")

Private Sub crReportHeaderSection_Format(ByVal pFormattingInfo As Object)

    Set crReportHeaderSection.ReportObjects.Item("Picture1").FormattedPicture = _
Exit Sub

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close