How to add image from local disk to crystal report 2008

Posted by Ahmedsa under C# on 10/26/2014 | Points: 10 | Views : 591 | Status : [Member] | Replies : 0
Hi guys i have proplem
I create crystal report(blank report) to show the data of employee from database hrdata on table Employee based on stored procedure
his name is ShowEmployee
when he write EmployeeNo in textbox1 control show employee detailes
as name,address,nationality,branch,join date,birth date,personal picture
but personal picture field not exist in database so that i need to show the picture from local
path from local hard disk
Meaning when i write in textbox1 employee no as 1233 show
1- detailes from database and that i already done
2-show image from local hard disk based on textbox1 (employee no) not done
i need code by c# to show image in crystal report from local drive based on employee no
how i do that
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Configuration;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportSource;
using CrystalDecisions.Shared;
using CrystalDecisions.Windows.Forms;

namespace FleetManagment
public partial class ShowEmployeeRecord : Form

public ShowEmployeeRecord()

private Reports.DateBaseReport objMyReport;
private ConnectionInfo objConnectionInfo;
private void setSQLParams()
ParameterField objParameterField =
ParameterDiscreteValue objParameterDiscreteValue;
objParameterDiscreteValue = new ParameterDiscreteValue();
objParameterDiscreteValue.Description = "@EmployeeNo";
objParameterDiscreteValue.Value = Convert.ToDateTime (textbox1.text);
objParameterField = crystalReportViewer1.ParameterFieldInfo[1];

private void setDatabaseSettings()
objConnectionInfo = new ConnectionInfo();
objConnectionInfo.ServerName = "";
objConnectionInfo.DatabaseName = "hrdata";
objConnectionInfo.UserID = "sa";
objConnectionInfo.Password = "1234";

private void refreshReport()
Tables tables =Tables tables = objMyReport.Database.Tables;
foreach (Table tbl in tables)
TableLogOnInfo objTableLogOnInfo = new TableLogOnInfo();
objTableLogOnInfo.ConnectionInfo = objConnectionInfo;
crystalReportViewer1.ReportSource = objMyReport;

private void crystalReportViewer1_ReportRefresh(object source, CrystalDecisions.Windows.Forms.ViewerEventArgs e)
e.Handled = true;

private void button2_Click(object sender, EventArgs e)
objMyReport = new Reports.DateBaseReport();



(No response found.)

Login to post response