• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 843
  • Last Modified:

Picture Object

How can I change the picture in a Picture Object in Crystal Reports during runtime? I am using VB.NET 2003 and the Crystal Reports that comes bundled with that.

Thanks
0
SETP
Asked:
SETP
  • 8
  • 4
  • 2
1 Solution
 
GJParkerCommented:
This topic has been covered a number of times, take a look at this thread it should help.

Gary
0
 
SETPAuthor Commented:
Hey mlmcc, thanks for the links. I have already looked at them before, but the DynamicImage sampled that comes with it is for images from a database. I have the image on the harddrive.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
SETPAuthor Commented:
GJParker, which thread should I look at? I've tried search the Experts Exchange web site, but is there a way to perform a search in a specific channel? It searches the entire site and brings back tons of results!
0
 
SETPAuthor Commented:
Oh, never mind. Figured out how to search in just this topic. thanks
0
 
GJParkerCommented:
0
 
SETPAuthor Commented:
No prob. Thanks, will check it out now...
0
 
SETPAuthor Commented:
Well, I did a lot of searching and followed your link, and it looks like the best way is to add the image to the database (or the dataset). Funny though cause it appears to be possible in VB6 with the FormattedPicture property. But I can't find an equivalent in VB.NET
0
 
SETPAuthor Commented:
Is there a way to have a couple of fields on a Crystal Report associated to the columns of a table of a database, and then one other field, associated to a column of a different table of the same database?

Basically, I have a table on my report that gets populated from a table in a DataSet. But then I'd like a Picture on there aswell that gets populated from a different table (from an OLE Object column) in the same DataSet.
0
 
SETPAuthor Commented:
I found this example for changing a picture on a report in realtime

Dim crField As CRAXDDRT.FieldObject, crxPicture As CRAXDDRT.OLEObject
Set crField = m_Report.Sections("D").ReportObjects.Item(13)
Set crxPicture = m_Report.Sections("D").ReportObjects.Item(14)
Set crxPicture.FormattedPicture = LoadPicture(crField.Value)

But I'm really struggling to convert it to .NET code
0
 
SETPAuthor Commented:
I figured out that this code gives me a handle to the picture box on the report:

ocrStatement.Section6.ReportObjects.Item("Picture2")

Now how to change the picture that it displays...
0
 
GJParkerCommented:
0
 
GJParkerCommented:
The method supplied in my final post is valid for this question

GJParker
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 8
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now