Crystal Report无法正确显示图像 [英] Crystal Report not displaying image properly

查看:72
本文介绍了Crystal Report无法正确显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Crystal Reports没有多少经验,我需要一些帮助。我有一个画布,我用它来进行在线签名。我正在使用Javascript来获取图像,然后将其放在隐藏的字段中。然后我将图像提交给数据库,然后将我的签名字段拖放到水晶报表中。当我将报告导出为PDF时,图像显示为黑盒子。我检索了图像并将其保存在我的本地计算机上作为测试,它工作正常。



这是我的编码。



Hi, I don't have much experience with Crystal Reports and I am in need of some assistance. I have a canvas which I am using for an online signature. I'm using Javascript to get the image, then place it in a hidden field. I then submit the image to the db and I drag and drop my signature field in the crystal report. When I export the report as a PDF the image displays as a black box. I have retrieved the image and saved it on my local machine as a test and it works fine.

Here is my coding.

var image = document.getElementById("sketch").toDataURL("image/png");
image = image.replace('data:image/png;base64,', '');
var hiddenField = document.getElementById('<%= hidImg.ClientID %>');



hiddenField.value =图片;




hiddenField.value = image;

 protected void btnSubmit_Click(object sender, EventArgs e)
    {
        //TODO: Find a way to save Canvas.
        var img = hidImg.Value;
        byte[] data = Convert.FromBase64String(img);
        Logsheets_Online LOs = new Logsheets_Online();
        LOs.LogsheetID = long.Parse(txtLogNumber.Text);
        LOs.Date = DateTime.Parse(txtDate.Text);
        LOs.OrderNumber = txtOrderNumber.Text;
        LOs.CallReferenceNumber = txtCallReferenceNumber.Text;
        LOs.CompanyID = int.Parse(ddlCompany.SelectedValue);
        LOs.ClientID = int.Parse(ddlCompany.SelectedValue);
        LOs.ClientName = txtOther.Text;
        LOs.EmployeeID = int.Parse(ddlEmployee.SelectedValue);
        LOs.TimeArrived = TimeSpan.Parse(txtTimeArrived.Text);
        LOs.TimeDeparted = TimeSpan.Parse(txtTimeDeparted.Text);
        LOs.TravelTime = int.Parse(txtTravelTime.Text);
        LOs.BillableKilometers = int.Parse(txtBillableKilometers.Text);
        LOs.SLA = int.Parse(txtSLA.Text);
        LOs.Other = int.Parse(txtOther.Text);
        LOs.BillableTime = int.Parse(txtBillableTime.Text);
        LOs.Rate = decimal.Parse(txtRate.Text);
        LOs.Name = txtName.Text;
        LOs.ClientSignature = data;
        LO.Logsheets_Onlines.InsertOnSubmit(LOs);
        LO.SubmitChanges();
}





任何帮助将不胜感激。谢谢



Any help would be appreciated. Thanks

推荐答案

嗨......

看到这一个,可能对你有帮助!使用 asp.net Mysql

如何使用asp.net,我的sql [ ^ ]

谢谢你。
Hi...
See this one, may its help full to u! Using asp.net and Mysql.
How to store images and displaying images in crystal reports using asp.net,my sql[^]
Thank u.


这篇关于Crystal Report无法正确显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆