crystal reportviewer打印按钮不起作用 [英] crystal reportviewer print button not working

查看:78
本文介绍了crystal reportviewer打印按钮不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用visual studio 2005; .net

reportviewer.reportsource是在后面的代码上设置的。打印按钮工作正常。

string reportPath = Server.MapPath(" rptCensusTract.rpt");
CrystalReportViewer1.ReportSource = reportPath;

然后我添加了一个reportsource来设置用户ID和密码背后的代码..

私有ReportDocument myreport;
....

myreport = new ReportDocument();
string reportPath = Server.MapPath(" rptCategoryHour.rpt" ;);
myreport.Load(reportPath);



CrystalReportViewer1.ReportSource = myreport;

之后,打印按钮不再有效。什么都没发生。没有错误消息。在这两种情况下,报告的视图都可以正常工作。

任何建议?

using visual studio 2005 ; .net

the reportviewer.reportsource is set on the code behind.  the print button worked fine. 

string reportPath = Server.MapPath("rptCensusTract.rpt");
        CrystalReportViewer1.ReportSource = reportPath;

Then I added a reportsource inorder to set the user id and password in the code behind..

 private ReportDocument myreport;
....

myreport = new ReportDocument();
        string reportPath = Server.MapPath("rptCategoryHour.rpt");
        myreport.Load(reportPath);

...

 CrystalReportViewer1.ReportSource = myreport;

 Following that, the print button no longer works.  Nothing happens.  There is no error message.  In both cases the view of the report works fine.

any suggestions?

推荐答案

Hi


是win form forms app还是web页?如果运行CrystalReportViewer对象的 PrintReport()方法怎么办?是否显示打印窗口?

Is it win forms app or web page? What if you run PrintReport() method of CrystalReportViewer object? Does it show print window or not even that?


这篇关于crystal reportviewer打印按钮不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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