Add a picture to a crystal report dynamically RRS feed

  • Question

  • Hi,

    I want to add a picture to a crystal report dynamically.

    The report data comes from SQL Server.

    The picture must be a file on the server and cannot be stocked in the database.

    I use VS2008 and Crystal Report Basic for VS2008.

    Is there a way to add a picture dynamically from a filepath?

    Thanks guys for your help!

    Choose a job you love, and you will never have to work a day in your life. - Confucious
    Friday, January 21, 2011 1:10 PM

All replies

  • Hi Kung-Foo Panda



    FileStream SFilStr = new FileStream(@"d:\graph\2362_Image2.bmp", FileMode.Open);

    BinaryReader SBinRed = new BinaryReader(SFilStr);

    ds.Tables[0].Rows[0]["Graph_Image2"] = SBinRed.ReadBytes((int)SBinRed.BaseStream.Length);


    Sandeep J. Sharma
    Monday, July 25, 2011 3:37 AM