Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
| 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 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 February 15th, 2005, 10:43 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default changing image/logo in report header

Hey everybody,

I am writing a web application using c# and ASP.NET.

My application generates reports and I am using crystal reports for that.

My report header is a bitmap that I attached as an OLE object.

I have different customers and they want their own logo in the header.

How can I perform it using c#? How can I let the user to insert a file path that contains its logo as a string and to change the header logo according to that path before generating the report?

Thank you

Haim


 
Old February 27th, 2005, 07:59 PM
Authorized User
 
Join Date: Feb 2005
Location: Sydney, NSW, Australia.
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have read the previous posting in this forum. In it, it mentioned the use of dataset to achieve this. Sorry but its not in C#.

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!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Logo on Datarepot Dynamically Solux VB Databases Basics 0 September 2nd, 2008 09:51 AM
logo link in the header & strange chars - mail luisjeronimo BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 June 26th, 2007 11:07 AM
displaying image as logo dynamically in report asad_uet Crystal Reports 0 June 26th, 2006 03:57 AM
CR.Net Not Showing Logo Image as well as Graphical Johnsony2k3 Crystal Reports 14 May 20th, 2006 01:35 PM
Placing Image in Header Section Of Crystal Report B.V.Madhav BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 0 May 9th, 2005 02:44 AM





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