水晶报表,ReportDocument.printtoprinter()在现场code不执行 [英] crystal reports, ReportDocument.printtoprinter() not executing in live code

查看:987
本文介绍了水晶报表,ReportDocument.printtoprinter()在现场code不执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发中,水晶报表被用于报告的Web应用程序。

I am developing a web application in which crystal reports are being used for Reporting.

开发环境: MS Visual Studio 2005中(ASP.NET,C#.NET和Crystal Reports)

Developing Environment : MS Visual Studio 2005 (ASP.NET, C#.NET And Crystal Reports)

使用code以下行我'

I'am using the following lines of code

ReportDocument objRd=new ReportDocument();
objRd.Load("SomeReport.rpt");
objRd.SetParameterValue(0,"Value");
objRd.PrintOptions.PrinterName="The Printer Connected";
objRd.PrintToPrinter(1,false,0,0);
objRd.Close();

在code工作在调试模式精细,打印机是越来越调用,我可以在纸张的打印。

The code works fine in debug mode, the printer is getting invoked and i can get a print on the paper.

当code为住(在IIS托管)执行行后的 objRd.PrintToPrinter(1,假的,0,0); 没有进一步的处理是怎么回事(要查看该我走了,以调试 - >附加到进程在Visual Studio IDE和连接的浏览器,这样当我通过URL访问托管的网站,我可以回到IDE,并继续调试)。

when the code is Live(hosted in IIS) after executing the line objRd.PrintToPrinter(1,false,0,0); no further process is going on (to check this i was gone to "Debug -> Attach to Process" in Visual Studio IDE and attached the Browser so that when i am accessing the Hosted website through URL i can get back to IDE and continue in Debug).

无论是它的系统自我没有得到挂起或应用程序。

Either the system it self not getting hang or the Application.

我可以重定向到的ReportDocument水晶报表查看器,可以将其转换为PDF,DOC等,但我需要直接打印输出到打印机。

I can redirect the ReportDocument to Crystal Report Viewer and can convert it to PDF,DOC etc., but i need to print the output directly to the printer.

请帮我解决这个问题。

由于提前

修改

我真的感觉不好,现在计算器解决不了一周(????)。

I am really feeling bad now that stackoverflow cannot solve my problem in a week(????).

最近我试图通过我的朋友,即充分的访问控制到托管文件夹中建议的方法。仍是问题:(站立

Recently i tried a method suggested by my friend i.e. giving full access control to the hosted folder. still the issues stands :(.

推荐答案

您需要把水晶报表的JavaScript到现场code iis的文件夹中。我不是JavaScript的肯定的提取位置现在。但搜索水晶报表javascript文件c盘。如果没有这个文件,你不能访问的水晶报表内置的任何功能。

You need to put the crystal report javascript into live code iis folder. I am not sure extract location of the javascript right now. but search the c drive for crystal report javascript files. without this files you can not access any inbuilt function of crystal reports

这篇关于水晶报表,ReportDocument.printtoprinter()在现场code不执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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