locked
Novice Crystal report help required RRS feed

  • Question

  • User48830696 posted

    Hi evr1 my name is  Avijit

    i hve a form where i hve 4 textbox and 2 buttons.On clicking the Button36 the other 3 txtbox are getting updated and when clicking Button38 the crystal report should be viewed accorrding to the textbx value....please i m a little weak in this department,so plz suggest me good...

    here is the form code :

    protected void Button36_Click(object sender, EventArgs e)
        {
            if (TextBox9.Text.Trim()== "")
            {
            Label23.Text = "IPID cant be blank";
            }
            else
            {
                con.Open();
                OracleCommand oc1 = new OracleCommand("select * from patient where P_ID='" +TextBox9.Text.ToString() + "'", con);
                OracleDataAdapter da = new OracleDataAdapter(oc1);
                DataTable dt = new DataTable();
                da.Fill(dt);
                int i = dt.Rows.Count;

                if (i==0)
                {
                    
                    Label23.Text = "IPID not found";

                }
                else if(i == 1)
                {
                    OracleDataReader or = oc1.ExecuteReader();
                    or.Read();
                    TextBox10.Text = or["name"].ToString();
                    TextBox11.Text = or["address"].ToString();
                    TextBox12.Text = or["in_date"].ToString();  


               }
                else if (i>1)
                {
                    Label23.Text = "Too many Result";
                }
                
                con.Close();
                 
            }


     protected void Button38_Click(object sender, EventArgs e)
        {
            //crystal report should be viewd from here..
        } 
          

    Saturday, June 19, 2010 6:21 PM

Answers

  • User-1659704165 posted

    use push method in Crystal Report

    http://www.codeproject.com/kb/aspnet/crystal_report.aspx

    create your own dataset and add on runtime chk the above link for simple explanation


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, June 20, 2010 2:24 AM

All replies

  • User-1659704165 posted

    better go this path

    C://program files/microsft visual stuid /Crystal reports/ Sample

    u will all sample waht u want.


    Sunday, June 20, 2010 1:44 AM
  • User48830696 posted

    yes i have seen those but im nt asking how to design a report,its abt the relation of report with asp pages...see my code

    Sunday, June 20, 2010 2:01 AM
  • User-1659704165 posted

    use push method in Crystal Report

    http://www.codeproject.com/kb/aspnet/crystal_report.aspx

    create your own dataset and add on runtime chk the above link for simple explanation


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, June 20, 2010 2:24 AM