Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Crystal Report with report Post Reply Post New Topic
Author Message
yumert
Newbie
Newbie
Avatar

Joined: 03 Jul 2008
Location: Turkey
Online Status: Offline
Posts: 1
Quote yumert Replybullet Topic: Crystal Report with report
    Posted: 03 Jul 2008 at 3:34am
Hello friends;
Csharp with use crystal report.Database use sqlserver.
Crystal Report in click when is your print button  not  view data.Why do not view data?
Sqldatareader with crystal report in multi record list.
Please help me..
Code..
protected void Button1_Click(object sender, EventArgs e)
    {
        string isemrino2 = TextBox1.Text;
        
        SqlConnection baglantim = new SqlConnection("Data Source=***;Database=****;User Id=***;Password=****");
        baglantim.Close();  
    string sorgu = "SELECT po.po5,po.description,po.ponum,po.orderdate,po.vendor,po.po3,po.po6,po.totalcost,companies.phone,companies.address1,longdescription.ldtext from po LEFT OUTER JOIN poline ON po.ponum=poline.ponum LEFT OUTER JOIN companies ON po.vendor =companies.company  LEFT OUTER JOIN longdescription ON po.ldkey=longdescription.ldkey   where po.ponum =@satinalmano";
      
    SqlCommand cmd = new SqlCommand(sorgu,baglantim);
        SqlParameter param = new SqlParameter();
        baglantim.Open();
    
    param.ParameterName = "@satinalmano";
    param.Value = TextBox1.Text;
    cmd.Parameters.Add(param);
    cmd.ExecuteNonQuery();
    
    
    SqlDataAdapter deneme = new SqlDataAdapter(sorgu,baglantim);

    deneme.SelectCommand.Parameters.AddWithValue("@satinalmano", TextBox1.Text);
    DataSet ds = new DataSet();
  deneme.Fill(ds);
  foreach (DataRow row in ds.Tables[0].Rows)
  {

      

      Label1.Text= row["po3"].ToString();

      
  }

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.039 seconds.