在asp.net 3.5中实现Crystal报表时,加载报告失败 [英] Load report failed when implementing crystal report in asp.net 3.5

查看:579
本文介绍了在asp.net 3.5中实现Crystal报表时,加载报告失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Im实现水晶报告,它是内置在visual studio 2008。当我创建我的水晶报告并检查其预览,它显示我的数据,但当我调用它在我的abc.aspx页面报告不加载和给出错误加载报告失败。
这是我的代码

Im implementing crystal report which is builtin in visual studio 2008. When i create my crystal report and check its preview it shows me the data but when i call it on my abc.aspx page report doesnt load and gives error 'Load report failed'. This is my Code

 <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" 
            AutoDataBind="true" ReportSourceID="CrystalReportSource1" />
        <br />
    <br />
    <br />
        <br />
        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
            <Report FileName="Reports/DailyPaymentStatus.rpt">
            </Report>
        </CR:CrystalReportSource>

可能会出错。此报告还接受4个参数,并且不在任何地方设置它们。还有一件事我想提一下,如果我做另一个简单的项目,并做同样的事情,它运行完美,并给我的输出。

what may be im doing wrong. This report also accept 4 parameters and im not setting them anywhere. Also one thing i want to mention if i make another simple project and do the same thing it runs perfectly and give me the output.

推荐答案

p>是的。我找到了答案的问题是路径

Yes. I found out the answer the problem is with the path

<Report FileName="Reports/DailyPaymentStatus.rpt"> 

它必须像

<Report FileName="~/Reports/DailyPaymentStatus.rpt">

这篇关于在asp.net 3.5中实现Crystal报表时,加载报告失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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