Sorry still no results:(
don't know whats happening... i don't get any error but the image is not
shown... here is my code:
Try
Dim _fs As FileStream = New FileStream("c:\a.bmp", FileMode.Open,
FileAccess.Read, FileShare.ReadWrite)
Dim buff(_fs.Length) As Byte
_fs.Read(buff, 0, buff.Length)
_fs.Close()
Dim _dr As DataRow = IspisRacunaDS1.SLIKA_TABLE.NewRow
'IspisRacunaDS1 - dataset
'SLIKA_TABLE - table
'LOGo is a column of the table of a base64Binary type
IspisRacunaDS1.SLIKA_TABLE.Rows().Add(_dr)
_dr("Logo") = buff
_dr("ID") = 1
Catch ex As Exception
End Try
"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@127.0.0.1...
"=?Utf-8?B?RGFtaXI=?=" <Da***@discussions.microsoft.com> wrote in
news:B1**********************************@microsof t.com:
Please I need help and dont know where to post the question.....
So I am making a small asp.net application and need to generate a
crystal report with one image that changes depending of some data.
With the vs.net version of Crystal Reports this is trick to do. But this
is how you do it:
1. Create a dataset with a BLOB column (System.Byte[] column)
Dim _dcLogo As DataColumn = New DataColumn("Logo", System.Type.GetType
("System.Byte[]"))
2. Populate the new dataset with the data you wish.
3. Stuff the graphic into the Blob column.
'Read data into a byte array
'Read data into a byte array
Try
Dim _fs As FileStream = New FileStream(_ImagePath, FileMode.Open,
FileAccess.Read, FileShare.ReadWrite)
Dim buff(_fs.Length) As Byte
_fs.Read(buff, 0, buff.Length)
_fs.Close()
Dim _dr As DataRow = _Table.NewRow
'Put buffer into Logo Field
_dr("Logo") = buff
_Table.Rows.Add(_dr)
Catch ex As Exception
End Try
4. In the report designer, drag the blob column onto your report,
Crystal will automatically output the blob in the proper graphics format
(JPEG, GIF, etc). I've only tried using the BLOB column with JPEG
graphics.
I am using a Oracle database and for me is not important if the images
are on the hard drive or in the database... I just dont know how ti
implement a image that changes in the crystal report
Thanks in advance... kindly regards
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/