无法从已发布的网站打印 [英] Can't Print from Published website

查看:111
本文介绍了无法从已发布的网站打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



请帮助我如何从Crystal报表中获取打印输出.
我没有安装Crystal Report.我正在Visual Studio 2008中使用Crystal Report Viewer.

在我的本地主机中,该水晶报表运行良好.但是当发布站点时,它不起作用.
Crystal报表图标未加载到报表中,当我单击打印"图标时,出现以下错误.

找不到

在此服务器上找不到所需的文档.


我的Crystal Report打印代码如下.

Hi,

Please help me how to get printout from crystal report.
Me didn''t install crystal report. Am using the crystal report viewer in Visual Studio 2008.

In My localhost that crystal report working good. But when Publish the site its not working.
Crystal report icons not loading in the report, When i click the print icon,Am getting the following error.

Not Found

The requested document was not found on this server.


My Crystal Report printing code is below..

ReportDocument crystalRepo = new ReportDocument();
        DataSet1 ds1;
        string qry = "SELECT A.Id,A.SDate, A.MonthName, A.Yar, B.ShortName, B.[Name], B.Department, A.BasicPay, A.DA, A.HRA, A.SpPay, A.OtherEarnings, A.GrossPay, A.Pf, A.ProfTax, A.LoanDue, A.LOP, A.Advances, A.RD, A.OtherDeductions,A.TotalDeduction as TotalDeduction, A.NetSalary, A.Totdays, A.Present, A.LDays, C.PartyName, C.Address3 FROM Tbl_Pay_SalaryCalculation A, Tbl_Sc_StaffProfile B, Tbl_Com_SchoolProfile C WHERE B.Id = A.StaffId AND C.Compid = A.compid AND A.Deleted = 'NO' AND B.Deleted = 'NO' AND A.MonthName = 'June' AND A.Yar = '2012'";
        da = new SqlDataAdapter(qry, con);
        ds1 = new DataSet1();
        da.Fill(ds1, "PaySlip");
        crystalRepo.Load(Server.MapPath("CrystalReport.rpt"));
        crystalRepo.SetDataSource(ds1);
        CrystalReportViewer1.ReportSource = crystalRepo;


请给我解决方法

请帮帮我...
在此先感谢...


Please give me the solution

Please help me...
Thanks in Advance...

推荐答案

未找到所需的文档.
该错误仅表示您定义的报告路径没有该报告.

您需要确保定义的路径中存在"CrystalReport.rpt".要么根据代码文件提供适当的相对路径,要么提供绝对路径,以便您的代码找到RPT并加载它.
Not Found The requested document was not found on this server.
This error simply means that the report path defined by you does not have the report.

You need to make sure that ''CrystalReport.rpt'' is present in the path defined. Either give proper relative path based on the code file OR provide absolute path such that your code finds the RPT and loads it.


这篇关于无法从已发布的网站打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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