简体   繁体   English

在Asp.net中使用Crystal Reports时出现问题

[英]Problems while using Crystal Reports in Asp.net

I have created reports using Crystal Reports in my asp.net application(vb). 我已经在asp.net应用程序(vb)中使用Crystal Reports创建了报告。 It was fine. 很好 But when I run it in another system, the report loading fails. 但是,当我在另一个系统中运行它时,报告加载失败。 So I modified my code like this. 所以我这样修改了我的代码。

sub Loadreport()
try
Dim sreport as new ReportDocument
sreport.Load(Server.MapPath("ClientList.rpt"))
sreport.FileName=Server.MapPath("ClientList.rpt")

catch(ex.exception)

end try
End sub

When the control comes to the line:- 当控件进入生产线时:-

sreport.Load(Server.MapPath("ClientList.rpt"))

it jumps to the catch block showing "Invalid Report path". 它跳转到显示“ Invalid Report path”的catch块。 But initially, the code was not showing any error. 但是最初,代码没有显示任何错误。 I haven't changed the path. 我没有改变道路。 What's wrong? 怎么了?

将路径记录到跟踪文件或错误日志中,或将其写入reponse。,然后查看“其他系统”上的路径是否是存储ClientList.rpt的正确路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM