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

change a picture at runtime in crystal reports with vb.net


How can I change the picture in a Picture Object in Crystal Reports ...
I am using  Crystal Reports  that comes with VB.NET.  I want to be able to change the logo that apears in the section 2 based on values.  I would like to pass a path to the image to the report.  
0
troyvw
Asked:
troyvw
  • 7
  • 3
  • 3
1 Solution
 
puranik_pCommented:
Look into the LoadPicuture method. This will allow you to dynamically place a picture on an OLE Object field within a Crystal Report. Basically, create an OLE Object on your report designer. Then, in your code..when launching the report assign the picture you want using LoadPicture.
0
 
troyvwAuthor Commented:
puranik_p have you used the load picture method with vb.net?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
puranik_pCommented:
No. I haven't.
0
 
troyvwAuthor Commented:
puranik_p it seems that the load picture method does not work with .net
0
 
troyvwAuthor Commented:
Does anybody know if there is a dirrect way to do this such as just set a property or call a method of the OLE Object field??
0
 
puranik_pCommented:
Why don't you post a pointer to this question at http://www.experts-exchange.com/Databases/Crystal_Reports/ ?
You will get more assistance by this.

Pura
0
 
troyvwAuthor Commented:
pura i will try that
0
 
Éric MoreauSenior .Net ConsultantCommented:
Have you tried the solution at the link I gave you ?
0
 
troyvwAuthor Commented:
I took a look.  I did not quite get a hold of what is happening in the code yet but I will.  Not sure yet how to tell the old picture object to associate with the dataset field.....
0
 
Éric MoreauSenior .Net ConsultantCommented:
All your pictures have to be into the dataset and you have to bind an object of your report to this dataset.
0
 
troyvwAuthor Commented:
Emoureau --- What field type is the dataset value for the picture supposed to be.....
0
 
troyvwAuthor Commented:
I was able to solve the problem this morning.  emoureau you will because you led me in the right direction with the code and a few things you said helped me think through the solution more clearly.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 7
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now