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

New Message on BDOTNET

-----------------------------------------------------------
From: BalajiKrishnan
Message 1 in Discussion

Hi All,   I have designed a crystal report and in the button click of the  web 
application i am calling the report.... When i click the button it shows "Logon 
failed"   Here is my code...   private void Page_Load(object sender, System.EventArgs 
e)
                {
                        SqlDataAdapter adapter = new SqlDataAdapter();
                        DataSet test = new DataSet("EFTTable");

                        SqlConnection conn = new SqlConnection("server=server;User
ID=sa;Password=sa;database=McoDev;Connection Reset=FALSE;Min Pool
Size=5");
                        SqlCommand command = new SqlCommand();
                        command.Connection = conn;
                        command.CommandText = "Test_EOBDetails";
                        command.CommandType = CommandType.StoredProcedure;

                        command.Parameters.Add("@CHECKNUMBER", SqlDbType.Char);// Put 
user code
to initialize the page here
                        command.Parameters["@CHECKNUMBER"].Value = "00007020";
adapter.SelectCommand = command;
                        adapter.Fill(test,"EFTTable");
                        dg1.DataSource=test;
                        dg1.DataMember="EFTTable";
dg1.DataBind();
                        dg1.Visible=true;

                }

                #region Web Form Designer generated code
                override protected void OnInit(EventArgs e)
                {
                        //
                        // CODEGEN: This call is required by the ASP.NET Web Form 
Designer.
                        //
                        InitializeComponent();
                        base.OnInit(e);
                }

                /// <summary>
                /// Required method for Designer support - do not modify
                /// the contents of this method with the code editor.
                /// </summary>
                private void InitializeComponent()
                {
                        this.Button1.Click += new 
System.EventHandler(this.Button1_Click);
                        this.Load += new System.EventHandler(this.Page_Load);

                }
                #endregion

                private void Button1_Click(object sender, System.EventArgs e)
                {
                        CrystalReport4 cr= new CrystalReport4();
                        cr1.ReportSource=cr;
                        cr1.ShowFirstPage();
                }
        }     Thanks Balaji



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

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to