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
| 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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


Reply With Quote
  #2 (permalink)  
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

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))

Hope this help!

Reply With Quote

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
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

All times are GMT -4. The time now is 04:14 PM.

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