i done a small application in asp.net with csharp code.
Design As Follows;
Project ID Dropdown P00001 to P00010,R00001 to R00010 etc.
Project Cost Textbox1
Project Name Textbox2
for this i done insert command and records are saved in database.
my Question is in design page i have one textbox and one button,and button name is Projectwisecost.
Textbox3 Projectwisecost(Button Name) .
in textbox3 when i type P00001 that projectcost,name should be displayed.
suppose when i type R00001 that projectcost,name should be displayed.
The above should be displayed in crystal report.how to do.
please help me.
When click the Run Report Button i want to show the report
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Satyapriya NayakRank #47 · 31.5K reputationPosted Oct 18, 2012, 11:55 PM EDT
private void btnshow_Click(System.Object sender, System.EventArgs e)
{
con.Open();
string str = "select * from student where sid='" + TextBox1.Text + "'";
SqlCommand com = new SqlCommand(str, con);
SqlDataAdapter sqlda = new SqlDataAdapter(com);
DataSet ds = new DataSet();
sqlda.Fill(ds, "student");
con.Close();
r1.SetDataSource(ds);
CrystalReportViewer1.ReportSource = r1;
CrystalReportViewer1.RefreshReport();
CrystalReportViewer1.Refresh();
}