Image 如何在crystal report中打印图片

Image 如何在crystal report中打印图片,image,printing,crystal-reports,report,Image,Printing,Crystal Reports,Report,我有一个客户号码和我想要查看并打印输出的图像 如何打印crystal report中的图片(DataRow objDataRow、string strImageField、string FilePath) { 尝试 { FileStream fs=新FileStream(文件路径, System.IO.FileMode.Open,System.IO.FileAccess.Read); 字节[]图像=新字节[fs.Length]; 读取(图像,0,转换为32(fs.Length)); fs.Clo

我有一个客户号码和我想要查看并打印输出的图像 如何打印crystal report中的图片(DataRow objDataRow、string strImageField、string FilePath) { 尝试 { FileStream fs=新FileStream(文件路径, System.IO.FileMode.Open,System.IO.FileAccess.Read); 字节[]图像=新字节[fs.Length]; 读取(图像,0,转换为32(fs.Length)); fs.Close(); objDataRow[strImageField]=图像; } 捕获(例外情况除外) { //回复。写(“+ex.Message+”); } }

؟؟؟؟؟؟؟؟؟؟؟؟؟

OleDbCommand Cmd=新的OleDbCommand(); OleDbDataAdapter myAdapter=新的OleDbDataAdapter(); Cmd.CommandText=“从SaveImage中选择CCont,其中CCont=”+textBoxet.Text+”; Cmd.Connection=myConn

        myAdapter.SelectCommand = Cmd;

        try
        {
            myConn.Open();
            myAdapter.Fill(ds.Tables[0]);
            myConn.Close();
        }
        catch (Exception ex)
        {
            throw;
        }


        for (int index = 0; index < ds.Tables[0].Rows.Count; index++)
        {
            if (ds.Tables[0].Rows[index]["image"].ToString() != "")
            {
                string s = ds.Tables[0].Rows[index]["image"].ToString();

                if (File.Exists(s))
                {
                    LoadImage(ds.Tables[0].Rows[index], "image", s);
                }
                else
                {
                    LoadImage(ds.Tables[0].Rows[index], "image",
                              "DefaultPicturePath");
                }
            }
            else
            {
                LoadImage(ds.Tables[0].Rows[index], "image",
                          "DefaultPicturePath");
            }
        }

        try
        {
            // Finally display report in crystal report viewer
            ReportDocument crDoc = new ReportDocument();
            crDoc.Load("CrystalReport1.rpt");
            crDoc.SetDataSource(ds.Tables[0]);
myAdapter.SelectCommand=Cmd;
尝试
{
myConn.Open();
myAdapter.Fill(ds.Tables[0]);
myConn.Close();
}
捕获(例外情况除外)
{
投掷;
}
对于(int index=0;index

}

你试过什么吗!!!