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 | Calendar | 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 December 20th, 2004, 04:08 AM
Registered User
 
Join Date: Dec 2004
Location: HK, , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default dynamic adding image to crystal report

I am using Crystal Report.NET and I want to insert an image file to my report which changes according to a field value that specify its file path. How to do this?

Thanks for your help!
Reply With Quote
  #2 (permalink)  
Old December 20th, 2004, 05:24 AM
Registered User
 
Join Date: Dec 2004
Location: HK, , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

oh! finally get the solution for my case

I have read the previous posting in this forum. In it, it mentioned the use of dataset to achieve this.

I create a dataset which one of the field in the data table is base64binary.
After retrieval of the file path, open the file and store the image file as array of byte in that column.
When you bind the dataset to your report as the data source, you can easily drag and drop the image field to your report.

Conversion of image file to array of byte:
Dim fs As New System.IO.FileStream(<file path>, IO.FileMode.Open)
Dim br As New System.IO.BinaryReader(fs)
Dim arrayByte() As Byte
arrayByte = br.ReadBytes(CInt(fs.Length))
br.Close()
fs.Close()

Hope this help!

Reply With Quote
  #3 (permalink)  
Old February 16th, 2005, 05:21 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi ywchan,

I am new in ASP.net with Crystal Report.Net and I face the same problem as urs.
I have do the same thing as u mentioned, but still not working
(I am now just testing by putting a static picture path inside the <file path> field, but still the image is not showing in the report, so I think I am not inserting the binary values into the dataset correctly. Would you mind gimme some advice to solve the problem ?
Many thz !

Reply With Quote
  #4 (permalink)  
Old February 16th, 2005, 09:48 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey everybody,

I am having the same problem. i am using c# and crystal report and i want to allow the user to change the report logo from my defualt to its logo.

can you help me please? i didnt understand your solution.

help!!!

Thank you

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
Adding fields to the crystal report Pravin.k Crystal Reports 2 January 3rd, 2008 09:35 AM
dynamic image is not being created on crystal repo prat_0510 Crystal Reports 0 May 23rd, 2006 06:44 AM
Dynamic crystal report n_alavii Crystal Reports 0 May 11th, 2005 04:56 AM
Dynamic crystal report n_alavii Crystal Reports 0 May 11th, 2005 04:54 AM
dynamic link to image in report wolf27ea Access VBA 2 February 3rd, 2004 10:14 PM



All times are GMT -4. The time now is 11:36 PM.


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