Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 20th, 2004, 04:08 AM
Registered User
 
Join Date: Dec 2004
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!
 
Old December 20th, 2004, 05:24 AM
Registered User
 
Join Date: Dec 2004
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!

 
Old February 16th, 2005, 05:21 AM
Registered User
 
Join Date: Feb 2005
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 !

 
Old February 16th, 2005, 09:48 AM
Registered User
 
Join Date: Feb 2005
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






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





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