above code will show the graph of the data in the given querry in tblData.Code:SqlConnection conn = new SqlConnection(cVar.conString); conn.Open(); SqlCommand comm = conn.CreateCommand(); comm.CommandText = "SELECT * FROM tblData WHERE RACK_NO = '" + cboRackNo.Text + "' AND CALENDERED_DATE BETWEEN '" + dtpFrom.Text + "' AND '" + dtpTo.Text + "' ORDER BY CALENDERED_DATE DESC"; cVar.dataReader = comm.ExecuteReader(); try { if (cVar.dataReader.HasRows) { cVar.dataReader.Close(); SqlDataAdapter da = new SqlDataAdapter(comm); DataTable dt = new DataTable(); da.Fill(dt); crChart_Thickness cChart_Thickness = new crChart_Thickness(); cChart_Thickness.SetDataSource(dt); frmPrintPreview fPrintPreview = new frmPrintPreview(); fPrintPreview.crystalReportViewer1.ReportSource = cChart_Thickness; fPrintPreview.ShowDialog();
but i have also added the table name "tblStandard" which created directly in the crystal report "Running Total" by getting the MAX and MIN value. the line graph is like this: example below is a graph
1. MAX
2. Data
3. MIN
if i use only table no problem bu if use 2 tables it will ask for database password? my question is how could pass the database password both
tblData and tblStandard?
tnx


Reply With Quote