水晶报表中的错误 [英] Error in Crystal reports

查看:71
本文介绍了水晶报表中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经遍历了您发布的代码,正在Web应用程序中创建代码,执行此操作时出现错误
我的电子邮件ID为[已删除电子邮件ID]
这是我正在使用的表
---------------------------------

Hi,

I have gone through the code which you have posted , i am creating in web application , on doing so i am getting error
my email id is [email id removed]
this is the table which i am using
---------------------------------

GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[stu](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [name] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [address] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]


-------------------------------


-------------------------------

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;

using System.IO;
using System.Data.SqlClient;


public partial class _Default : System.Web.UI.Page 
{
     public void frmMain()
        {
          
        }
        
        private void frmMain_Load(object sender, EventArgs e)
        {
            CrystalReport objRpt;
            // Creating object of our report.
            objRpt = new CrystalReport();
            SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["pro"].ToString());
            SqlCommand comd = new SqlCommand("select * from  stu", con);
            con.Open();
            SqlDataReader dr = comd.ExecuteReader(CommandBehavior.CloseConnection);
            DataSet Ds = new DataSet();
            adapter.Fill(Ds, "my_dt");
            objRpt.SetDataSource(Ds);
            CrystalDecisions.CrystalReports.Engine.TextObject root;
            root = (CrystalDecisions.CrystalReports.Engine.TextObject)
                 objRpt.ReportDefinition.ReportObjects["txt_header"];
            root.Text = "Sample Report By Using Data Table!!";
            // Binding the crystalReportViewer with our report object. 
            crystalReportViewer1.ReportSource = CrystalReport.rpt;
        }

    void videodata()
    {
        SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["pro"].ToString());
        SqlCommand comd = new SqlCommand("select * from  stu", con);
        con.Open();
        SqlDataReader dr = comd.ExecuteReader(CommandBehavior.CloseConnection);
        
        DataSet Ds = new DataSet();
        adapter.Fill(Ds, "my_dt");
        objRpt.SetDataSource(Ds);
        CrystalDecisions.CrystalReports.Engine.TextObject root;
        root = (CrystalDecisions.CrystalReports.Engine.TextObject)
             objRpt.ReportDefinition.ReportObjects["txt_header"];
        root.Text = "Sample Report By Using Data Table!!";
        // Binding the crystalReportViewer with our report object. 
        crystalReportViewer1.ReportSource = objRpt;

        
    }

    }


当我跑步时,它给出错误信息,请告诉我错误信息在哪里

谢谢
nassim
[删除电子邮件]


when i am running , its give error please tell me where is the error

thanks you
nassim
[Email removed]

推荐答案

好像您已根据某篇文章发表了问题.每篇文章的末尾都有一个消息论坛,您可以在其中发布您的评论/疑问.在此处发布此内容将使您早日得到答复.

作者可能在这里甚至没有读过它.请在文章消息论坛上发布相同的内容.
Looks like you have posted question based on some article. At the end of each article there is a Message Forum, where you can post your comments/doubts. Posting this there would get you an early reply.

It might happen that the author might not even read it here. Please post the same at the article message forum.


这篇关于水晶报表中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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