Click here to Skip to main content
15,925,399 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Pls some tell that how to show data in crystal report from database by selecting id in windows application my code is,
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            CrystalReport1 rpt = new CrystalReport1();
            DataSet ds = c.resume(Convert.ToDouble(comboBox1.Text));
            //DataSet ds = c.resume();
          //  DataTable dt = ds.Tables[0];
            rpt.SetDataSource(ds.Tables[0]);
            
           // crystalReportViewer1.ReportSource = dt;
            crystalReportViewer1.ReportSource = rpt;
           
            //All_view_report obj_All_view_report = new All_view_report();
            ////obj_All_view_report.ParentForm = Parent;
            //obj_All_view_report.crystalReportViewer1.ReportSource = rpt;
            //obj_All_view_report.Show();
            
        }

Pls some one tell, My data is not displaying from database, pls help me......
Posted
Updated 21-Jun-11 3:06am
v2

1 solution

You're going to need to provide more information if you want any help on this issue.

Is your dataset filled properly? When you debug it, do you see your data? If not the problem could be in the c.resume() function and we can't help you fix it without seeing that code.

Otherwise it could be in the Crystal Report. Did you setup your links properly in the Database Expert menu?

You say your data is not displaying...all of the data? Or just the detail section? Do you get any error messages?

You may want to start by researching crystal reports in the CP Articles[^].
 
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