Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load/Change a Picture at Runtime with VB.NET 2003

Status
Not open for further replies.

MAKNIGHT71

IS-IT--Management
Sep 25, 2003
67
US
I have a crystal report created inside the .NET design IDE, and I am assuming this report is now embedded in the application (perfectly fine - and preferred - in this case). I have an OLE object in the report that I wish to use to allow me to change the picture (a corporate logo) at runtime.

I have the following which works fine for refreshing and printng the report (where crPackingList is the embedded report shown in the VS Solution Explorer)...
Dim crPackList As New crPackingList
crPackList.Database.Tables(0).Location = "C:\My.mdb"
crPackList.Refresh()
crPackList.PrintToPrinter(1, False, 1, 1)

I have tried the following line, but the ReportObject is ReadOnly:
crPackList.Section6.ReportObjects("picLogo") = System.Drawing.Image.FromFile("C:\MyLogo.bmp")

Suggestions? This is my first time working with CR in an application.

Regards,
MAKnight
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top