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 June 26th, 2006, 03:57 AM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default displaying image as logo dynamically in report

CrystalReport1 r;

FileStream fs = new FileStream(@"C:\logo1.jpg", FileMode.Open);
            BinaryReader br = new BinaryReader(fs);
            byte[] pic = br.ReadBytes((int)fs.Length);
            br.Close();
            DataSet ds = new DataSet();
            string strQry = "";
            strQry="select * from customer";
            m_Reader=m_GenDB.Reader(strQry);
            ds.Tables.Add(this.GetTable(m_Reader));
        ds.Tables[0].Columns.Add("Logo", typeof(byte[]));
        ds.Tables[0].Rows[0]["Logo"] = pic;
                r =new CrystalReport1();
            r.m_StrReportName = "SaleReport.rpt";

            r.SetDataSource(ds);
    crystalReportViewer1.ReportSource = r;


COMMENT: I am using the code above to display my company logo on the crystal report . The logo is also displayed on the report but there is duplication of entries such that the whole list of entries repeates again and again many times . would any one help me what could be the problem here and how to solve it.

asad khan





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
loading an image dynamically into my report orson4music Crystal Reports 1 January 4th, 2008 09:35 AM
Problem in displaying image in report hthakkar BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 2 March 1st, 2006 10:26 PM
Problem with displaying image on the report hthakkar Reporting Services 0 March 1st, 2006 09:48 AM
changing image/logo in report header h_haviv Crystal Reports 1 February 27th, 2005 07:59 PM





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