Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 23rd, 2008, 12:28 AM
Registered User
 
Join Date: Feb 2008
Location: Thodupuzha, Kerala, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Displaying Database Image into Crystal Reports

I have a problem, displaying pictures from database onto report, i put the picture there but it is not showing at all when i run and view, is there something i am not doing right.

The VB.Net code I used to store image in access database ( ref. field Name "Logo" type "OLEObject"


'Read Blob Image Data to Byte Array
            '===========================================
            Dim FileStreamObject As New System.IO.FileStream(Trim(txtLogoIMG.Text), IO.FileMode.Open, IO.FileAccess.Read)
            Console.Write(FileStreamObject.Length)
            Dim PictureByteArray(CType(FileStreamObject.Length() - 1, Integer)) As Byte
            FileStreamObject.Read(PictureByteArray, 0, PictureByteArray.Length)
            FileStreamObject.Close()
            '===========================================
.
.
.
.
.

 'Write Blob Image data to Access Databse
                    objData.AddParameter("@Logo", OleDb.OleDbType.LongVarBinary, PictureByteArray.Length, PictureByteArray)

Here objData is class object ie. I am using to data operations, "AddParameter" is a member proc.

Public Sub AddParameter(ByVal Name As String, ByVal Type As OleDbType, _
        ByVal Size As Integer, ByVal Value As Object)
        Try
            Command.Parameters.Add(Name, Type, Size).Value = Value
        Catch OleDbExceptionErr As OleDbException
            Throw New System.Exception(OleDbExceptionErr.Message, _
                OleDbExceptionErr.InnerException)
        End Try
    End Sub



Kind Regards

Aneesh Sankar
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Reports: Displaying percentages of total q Goalie35 Crystal Reports 0 December 21st, 2006 05:51 PM
Displaying an image from database table Essien Visual Basic 2005 Basics 1 January 4th, 2006 03:40 PM
Displaying Crystal Reports using ASP Muskan406 Classic ASP Professional 0 January 3rd, 2006 04:18 AM
Displaying Crystal Reports using ASP Muskan406 ASP.NET 2.0 Professional 0 January 3rd, 2006 02:27 AM
VS Crystal Reports and an image smithsf22 BOOK: Professional Crystal Reports for VS.NET 0 December 14th, 2004 07:42 PM



All times are GMT -4. The time now is 08:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.