如何解决C#.net Crystal Report的问题 [英] how to solve problem for C # .net Crystal Report

查看:82
本文介绍了如何解决C#.net Crystal Report的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生\妈妈


我是一位较新的软件工程师.
我正在使用C#.net2010.
我想在水晶的帮助下显示报告.
但是它不显示报告,而是显示错误消息.
消息是加载报告失败(无效的报告文件路径)".
请帮我 .如何解决问题?

预先感谢,


Shailendra singh

.Net Developer

Dear Sir\Mam


I am fresher s/w engineer.
I am work with C#.net 2010.
I want show report with help of crystal.
But it doesn''t show report, it shows Error message.
The message is that "Load Report failed(Invalid report file path)".
Please help me . How can solve the problem?

Thanks in advance ,


Shailendra singh

.Net Developer

推荐答案

您需要将报告路径设置为已部署的.rpt文件的位置.

例如
You need to set the report path to the location of your deployed .rpt file

e.g
DataTable dt = SomeDataObject.GetPrintReportData();

ReportDocument report = new ReportDocument();
report.Load(Server.MapPath("~/Pages/YourReportFile.rpt"));
report.SetDataSource(dt);


将水晶报表添加到安装项目,并检查IIS中自动创建的虚拟目录的设置(5.0还是6.0?).
add the crystal report to the setup project,and check the settings of the automatically created virtual directory in IIS (5.0 or 6.0 ?).


这篇关于如何解决C#.net Crystal Report的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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