访问菜单栏时出现Crystal Report错误 [英] Crystal report error while accessing the menubar

查看:76
本文介绍了访问菜单栏时出现Crystal Report错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

访问水晶报表中的菜单(例如打印,缩放,设置页面大小)时遇到问题,即,每当尝试从菜单栏访问任何内容时,都会出现以下错误.

水晶报表可以很好地加载并显示数据.

"登录失败.详细信息:crdb_adoplus:对象引用未设置为对象的实例.文件C:\ Users \ ADMINI〜1 \ AppData \ Local \ Temp \ CrystalReport {34BDD87A-5692-4002-8924- FBBA542A8D40} .rpt:"

水晶报表是使用C#在ASP.net上生成的.

C#代码:

Hello Everyone,

I am facing a problem while accessing the menus in crystal report like print, zoom, setting the page size, i:e whenever I tried to access anything from menubar, I am getting the following error.

The crystal report is loading fine and displaying the data as well.

"Logon failed. Details: crdb_adoplus : Object reference not set to an instance of an object. Error in File C:\Users\ADMINI~1\AppData\Local\Temp\CrystalReport {34BDD87A-5692-4002-8924-FBBA542A8D40}.rpt: "

The crystal report is made on ASP.net using C#.

C# Code :

using System.Data.SqlClient;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

public partial class c_report : System.Web.UI.Page
{
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["my_db"].ToString());
    ReportDocument rp = new ReportDocument();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        TextBox1.Visible = false;
        Button1.Visible = false;
        crpt();
    }
    private void crpt()
    {
        rp.Load(Server.MapPath("CrystalReport.rpt"));
        SqlDataAdapter da = new SqlDataAdapter("select * from creport where id='" + TextBox1.Text + "'", con);
        DataSet ds = new DataSet();
        da.Fill(ds, "creport");
        rp.SetDataSource(ds);
        CrystalReportViewer1.ReportSource = rp;
        CrystalReportViewer1.DataBind();
    }
}


预先感谢大家.


Thanks to everyone in advance.

推荐答案

验证报告中的数据库.检查这些帖子.
水晶报表错误登录失败.Details:crdb_adoplus:对象引用未设置为对象的实例 [ ^ ]
登录失败.详细信息:crdb_adoplus:对象引用未设置为对象的实例 [
Verify the database in your report. Check these posts.
Crystal Report Error Logon failed.Details:crdb_adoplus: Object Reference not set to an instance of an object[^]
Logon failed. Details: crdb_adoplus : Object reference not set to an instance of an object[^]


这篇关于访问菜单栏时出现Crystal Report错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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