Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Load image dynamically into Crystal Report documen Post Reply Post New Topic
Author Message
Adagio
Newbie
Newbie
Avatar

Joined: 17 May 2007
Online Status: Offline
Posts: 11
Quote Adagio Replybullet Topic: Load image dynamically into Crystal Report documen
    Posted: 06 Aug 2008 at 2:59am
I have been searching for long time, but so without luck

I'm using VB.net in VS2008

I have a class like this:


public class Person

public property Name as string
get
return "Peter"
end get
set

end set

public property ImageUrl as string
get
return "C:\Pictures\Peter.jpg"
end get
set

end set

End class



When I create a report I do this:

dim rep as New rptPerson

rep.SetDataSource(listOfPerson)

Now I need some way to set the picture box on the report to the picture I get in the ImageUrl property. The list always only contain one Person, so it doesn't need to load many pictures

At first I thought it would be like how you can set the text property on text objects like this:


 CType(rap.ReportDefinition.ReportObjects("NameOfTextField"), CrystalDecisions.CrystalReports.Engine.TextObject).Text = "Just some text"


Changed it to this:


CType(rap.ReportDefinition.ReportObjects("picPerson"), CrystalDecisions.CrystalReports.Engine.PictureObject)


But unfortunately that one doesn't open up for properties like Image, picture or whatever that could be called
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.