如何解决水晶报告文件名无效? [英] How to solve crystal report Invalid file name ?

查看:102
本文介绍了如何解决水晶报告文件名无效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


i我正在使用水晶报告开发网站,同样的代码在我的机器上工作,但是如果我移动到服务器2102,它在负载报告查看器附近显示错误,如无效文件名。



'/ websam'应用程序中的服务器错误。 
---------------------------------------------- ----------------------------------


文件名无效。
描述:执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:System.Runtime.InteropServices.COMException:文件名无效。

来源错误:



第26行:'分配数据源并设置报表查看器的属性
第27行:Dim rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
第28行:rptDocument.Load(strReportPath)
第29行:
第30行:rptDocument.SetDatabaseLogon(ConfigurationManager.AppSettings(UserID)。ToString ,ConfigurationManager.AppSettings(SQLPassword)。ToString)


源文件:C:\inetpub \wwwroot \websam \SReport.aspx.vb行:28







i移动完整代码并安装正确的水晶报告exe.i我添加名称空间如



  Imports  CrystalDecisions.CrystalReports.Engine.ReportDocument 
Imports CrystalDecisions。共享
Imports System.Data .Sq lClient
Imports System.Data
Imports CrystalDecisions.CrystalReports.Engine





请回复asap



问候

Aravind

解决方案

Hi
根据


*开发人员 - Vaibhav *


回答,在第一个链接和第一个答案解决了问题。



问题是由引起的 ASP .NET工作进程  访问 windows临时目录。 

尝试给每个人完整访问 windows临时目录





对于其他用户验证请尝试上面的步骤,尝试为C:\ Windows \ Temp文件夹中的Everyone用户提供完全访问权限。


Hi i am developing website using crystal report,same code work in my machin,but if i move to server 2102 ,it show error like invalid file name near load reportviewer.

Server Error in '/websam' Application.
--------------------------------------------------------------------------------


Invalid file name. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.Runtime.InteropServices.COMException: Invalid file name.

Source Error: 



Line 26:         'Assign the datasource and set the properties for Report viewer
Line 27:         Dim rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
Line 28:         rptDocument.Load(strReportPath)
Line 29: 
Line 30:         rptDocument.SetDatabaseLogon(ConfigurationManager.AppSettings("UserID").ToString, ConfigurationManager.AppSettings("SQLPassword").ToString)
  

 Source File:  C:\inetpub\wwwroot\websam\SReport.aspx.vb    Line:  28 




i am move full code and install correct crystal report exe also.i am add namespace like

Imports CrystalDecisions.CrystalReports.Engine.ReportDocument
Imports CrystalDecisions.Shared
Imports System.Data.SqlClient
Imports System.Data
Imports CrystalDecisions.CrystalReports.Engine



pls reply asap

Regards
Aravind

解决方案

Hi According to


*Developer - Vaibhav*


reply,in that first link and first answer solved problem.

problem was caused by the ASP .NET worker process not having access to the windows temp directory.

Try giving everyone full access to the windows temp directory



For other user verification pls try above step,try to give full access for Everyone user in C:\Windows\Temp folder.


这篇关于如何解决水晶报告文件名无效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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