Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to get a specified value from database and show it on database.
I have the following code.
C#
 SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=PFMS;User ID=sa;Password=123!@#abc");
con.Open();
                
int c = 1;
SqlCommand cmd = new SqlCommand("select * from tbl_expense where form_id=" + c , con);
                 
SqlDataAdapter da = new SqlDataAdapter(cmd);
CrystalReport1 rp = new CrystalReport1();
DataSet ds = new DataSet();
            
da.Fill(ds, "tbl_expense");
dt.Load(dr);
rp.SetDataSource(ds);

and it does not show the report. please tell me what i need to do.
thanks in advance
Posted
Updated 14-Jan-13 3:53am
v2

1 solution

you need crystal report viewer to display the crystal report
crystalreportviewer1.ReportSource=rp;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900