[求助]水晶报表问题

JADE_RABBIT 2009-04-24 11:25:39
[COMException (0x800002d8): 文件 D:\temp\CrystalReport1 {427FEDF3-5A06-4E53-AA49-1DECA9D392FB}.rpt内出错:
未能创建 Crystal 查询引擎。]
CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +87
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +279

[Exception: 加载报表失败。]
CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +340
CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +869
CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport() +97
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database, Boolean ignoreCase) +48
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database) +58
admin_tj.Page_Load(Object sender, EventArgs e) +50
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061


在本地 运行没有问题 发布到web服务器上出错
...全文
176 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
JADE_RABBIT 2009-04-28
  • 打赏
  • 举报
回复
D:\temp\ 是我的临时目录啊 大哥们

现在 我在直接用了一个空报表 发布 后还是 出错
加载报表失败


sushou2009 2009-04-27
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 llsen 的回复:]
路径错误
你写的是绝对路径
D:\temp\CrystalReport1
但是到服务器上这个路径就不对了
建议把报表文档放在项目下Report下
然后用相对路径

C# codestring map = Server.MapPath("\\Material\\ExcelReport");
[/Quote]
神眼啊~~哈哈~~正解~
zzxap 2009-04-27
  • 打赏
  • 举报
回复
ds = clsDBProcess.GetDataSet(Session("Server"), Session("Database"), sql)
ds.EnforceConstraints = False
ReportDoc.Load(Server.MapPath("~/report/TrainRec.rpt"))
ReportDoc.SetDataSource(ds.Tables(0))

Me.CrystalReportViewer1.ReportSource = ReportDoc
兔儿爷 2009-04-27
  • 打赏
  • 举报
回复
服务器上装了 CrystalReport了么,还要注意版本的问题的。

访问我的博客 程序员日记 http://www.ideaext.com
JADE_RABBIT 2009-04-26
  • 打赏
  • 举报
回复
[Quote=引用 12 楼 jijunwu 的回复:]
将报表 放在根目录下事实
[/Quote]
报表本来就在跟目录
JADE_RABBIT 2009-04-26
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 51Crack 的回复:]
没注册模块,装水晶报表就行了!
[/Quote]
注册模块??怎么个注册法
  • 打赏
  • 举报
回复
试试
  • 打赏
  • 举报
回复
将报表 放在根目录下事实
JADE_RABBIT 2009-04-26
  • 打赏
  • 举报
回复
我装了这个安装包了。。还是错误依旧
JADE_RABBIT 2009-04-26
  • 打赏
  • 举报
回复
服务器上 环境变量厘米那所有的temp目录我都指向 D:\temp了
我用的就是VS2005自带的水晶版本
还是出现这个错误

文件 D:\temp\CrystalReport1 {84D876AE-1279-40A2-9197-2D506DC356EF}.rpt内出错:
未能创建 Crystal 查询引擎。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Runtime.InteropServices.COMException: 文件 D:\temp\CrystalReport1 {84D876AE-1279-40A2-9197-2D506DC356EF}.rpt内出错:
未能创建 Crystal 查询引擎。

源错误:


行 23:
行 24:
行 25: CrystalReportSource1.ReportDocument.Load(Server.MapPath("CrystalReport1.rpt"));


在25行这里出错 ,如果 我吧代码绑定删除的话 就是 加载失败

51Crack 2009-04-26
  • 打赏
  • 举报
回复
没注册模块,装水晶报表就行了!
阿泰 2009-04-26
  • 打赏
  • 举报
回复
1:确认D:\temp对erveryone开放了可写权限。注意:需要查看服务器的环境变量,把temp目录都给everyone开放可写权限
2: 如果1还不行,那么安装一下这个包
如果你是VS2005且用的是VS2005自带的水晶版本的话,其余版本不能用
http://www.liteengine.net/files/VS2005CRInstallv1.rar
JADE_RABBIT 2009-04-26
  • 打赏
  • 举报
回复
有人会吗??
npy601 2009-04-24
  • 打赏
  • 举报
回复
帮顶一下。
zcandyly20211 2009-04-24
  • 打赏
  • 举报
回复
友情up!
fdc123 2009-04-24
  • 打赏
  • 举报
回复
不太懂,帮你顶一下!!
JADE_RABBIT 2009-04-24
  • 打赏
  • 举报
回复
我些的相对路径啊!~

<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" ReportSourceID="CrystalReportSource1" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="CrystalReport1.rpt">
</Report>
</CR:CrystalReportSource>
少冲 2009-04-24
  • 打赏
  • 举报
回复
恩,你发布到Web服务器的时候 , 应该看一下水晶报表所在的路径, 而且, 不知道你写的是绝对路径还是相对路径, 若是绝对路径,需要 map = Server.MapPath("\\Localhost\\**.rpt");或者 map = Server.MapPath("~\\**\\**.rpt")
viki117 2009-04-24
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 llsen 的回复:]
路径错误
你写的是绝对路径
D:\temp\CrystalReport1
但是到服务器上这个路径就不对了
建议把报表文档放在项目下Report下
然后用相对路径

C# codestring map = Server.MapPath("\\Material\\ExcelReport");
[/Quote]
对头对头。。。
llsen 2009-04-24
  • 打赏
  • 举报
回复
路径错误
你写的是绝对路径
D:\temp\CrystalReport1
但是到服务器上这个路径就不对了
建议把报表文档放在项目下Report下
然后用相对路径
string map = Server.MapPath("\\Material\\ExcelReport");

111,125

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧