Crstel report based on the dropdownlist
hi Frnds...i want to generate crystal report to display itemcode ,batch no, expiry date based on t location and itemcode. I get Location and Item code in dropdownlist...Any1 help me plz...its very urgent....
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Kunal VaishyaRank #990 · 2K reputationPosted May 15, 2012, 1:02 AM EDT
Fill dataset with any table like Code and Name
after
Set DataSource into DropDown Like this
private void FillDropDownList()
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnString"].ConnectionString);
SqlCommand cmd = new SqlCommand("Select * from students", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
DropDownList1.DataTextField = ds.Tables[0].Columns["FullName"].ToString();
DropDownList1.DataValueField = ds.Tables[0].Columns["id"].ToString();
DropDownList1.DataSource = ds.Tables[0];
DropDownList1.DataBind();
}
sathish kumar115 reputationPosted May 15, 2012, 1:23 AM EDT