Click here to Skip to main content
15,914,795 members

Comments by prashbari (Top 10 by date)

prashbari 4-May-15 7:26am View    
Thank you.. It showing all data..
prashbari 4-May-15 7:04am View    
cmd = new SqlCommand("Select * from hosp_admin", con);
da = new SqlDataAdapter(cmd);
DataSet Ds = new DataSet();

//// here my_dt is the name of the DataTable which we
//// created in the designer view.
da.Fill(Ds, "hosp_admin");
if (con.State != ConnectionState.Open)
con.Open();
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(@"C:\Users\Administrator\Desktop\Projects_cur\HospitalApp\HospitalApp\CrystalReport1.rpt");
cryRpt.SetDataSource(Ds);
//cryRpt.SetDatabaseLogon("admin", "admin123");
crystalReportViewer1.ReportSource = cryRpt;
//crystalReportViewer1.Refresh();
con.Close();

but it does not show any record
prashbari 4-May-15 7:03am View    
i tried this code
cmd = new SqlCommand("Select * from hosp_admin", con);
da = new SqlDataAdapter(cmd);
DataSet Ds = new DataSet();

//// here my_dt is the name of the DataTable which we
//// created in the designer view.
da.Fill(Ds, "hosp_admin");
if (con.State != ConnectionState.Open)
con.Open();
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(@"C:\Users\Administrator\Desktop\Projects_cur\HospitalApp\HospitalApp\CrystalReport1.rpt");
cryRpt.SetDataSource(Ds);
//cryRpt.SetDatabaseLogon("admin", "admin123");
crystalReportViewer1.ReportSource = cryRpt;
//crystalReportViewer1.Refresh();
con.Close();
but it does not display any record
prashbari 6-Apr-15 10:16am View    
format Year/Month/{patient_no} 2015/04/1 2015/04/2. This field should be auto increment
prashbari 6-Apr-15 6:39am View    
Year/month will be same but only numbers will change for whole month. After month changes it again set to new month. 1,2,3 are automatically increment for the same month.