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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display a picture in CR from a database

Status
Not open for further replies.

robert201

Programmer
Jul 18, 2007
80
TH
Hello,

VS 2005 & SQL 2005

I have a database field called signature and is an image datatype (binary data).

I am trying to display that signature in a crystal reports.

The signature has been displayed properly in the database as I can display the signature into a picture box using a memory stream. So I know the picture is there.

I am using typed datasets.

In CR i have dragged the signature field on to the crystal report and when i hover the mouse over it comes up with BLOB field.

However, when I run crystal reports it doesn't nothing in that field.

Is something more I have to do to display a picture in crystal reports?

Many thanks,

Steve
 
What version of Crystal Reports? What type of file is the signature? bitmap? jpg?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Hello,

Thanks for your reply.

I am using crystal reports for visual studio 2005, so i guess that is using CR 10.

The file format could be anything as it is a stream of bytes.

I used a memory stream to store the bytes in a image data type. I also use a memory stream to get the signature from the database and display it in a picture box on my windows form.

Code:
  Dim ms As New IO.MemoryStream
  ms.Write(signatureData, 0, signatureData.Length)

To get the signature and display in a picture box.
Code:
Dim stream As New IO.MemoryStream(pictureData)
picturebox1.image = Image.FromStream(stream)

So I am completely lost about how to get this signature in the crystal report.

Many thanks for any advice you can give me.

Steve
 
My apologies, I thought you were using crystal as a stand alone tool, not as part of a VS.net project.

You should probably post this question in forum768, which is specific to using crystal with VB or .net.

Having said that, if you update to crystal XI no code is needed, just drag the database object (blob field) onto the report canvas. This was not available until XI without code.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top