Crystal报表无法打印并导出为PDF [英] Crystal report fails to print and export to PDF

查看:103
本文介绍了Crystal报表无法打印并导出为PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用asp.net网络表单Crystal报表。传递参数时生成报告,但无法打印并导出为PDF。单击导出按钮时没有任何反应,并且没有错误消息。



I'm working with an asp.net web form Crystal report. The report generates when I pass the parameter but it fails to print and export to PDF. Nothing happens when I click the export button, and there is no error message.

protected void Button1_Click(object sender, EventArgs e)
{
    SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["DbConnection"].ConnectionString);
    ReportDocument test = new ReportDocument();
    cn.Open();
    SqlCommand cmd = new SqlCommand("SELECT_DATA", cn);
    cmd.CommandType = CommandType.StoredProcedure;
    SqlDataAdapter da = new SqlDataAdapter(cmd);
    DataTable ds = new DataTable();
    cmd.Parameters.Add(new SqlParameter("@INPUT", TextBox1.Text));
    da.Fill(ds);
    test.Load(Server.MapPath("EOR.rpt"));
    test.SetDataSource(ds);
    test.SetParameterValue("input", TextBox1.Text);
    CrystalReportViewer1.ReportSource = test;
    CrystalReportViewer1.DataBind();
    cn.Close();
}





我的尝试:



我将文件复制到我的网站项目:



C:\inetpub \wwwroot\aspnet_client\system_web \4_0_30319文件夹和粘贴到我的项目文件夹



但仍无法正常工作..



What I have tried:

I copied the file to my website project:

C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319 folder and paste to my project folder

but still not working..

推荐答案

hiii KyLim0211,


我有同样的问题我浏览了很多解决方案,最后我通过粘贴 aspnet_client 的整个文件夹来解决它,包含 2_0_50727 4_0_30319 我的网络应用程序中的两个文件夹然后我能够看到水晶报告的打印和导出工具栏。

希望它也能解决你的问题。
hiii KyLim0211,

I had same problem i surfed many solutions and finally i resolved it by pasting the whole folder of aspnet_client containing 2_0_50727 and 4_0_30319 both folders in my web application then i was able to see the print and export tool bar of crystal reports.
hope it will solve yours too.


这篇关于Crystal报表无法打印并导出为PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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