i have make one report which have 7 sub reports.
this report will open very slowly, while other reports open fast.
I have find problem in subreport setdatasource fillup.
sReport.Subreports["IncommingTruck"].SetDataSource(ds.Tables[0])
Except this line all code execute fast and report open fast.
but i can't understand how to solve it ?
please help me..
I have use odbc coonection in all report.
other report have more data, while this report have few records compare to other
report.
What I have tried:
string SpName = "GetTruckIncomingForBossReport";
SqlCommand cm = new SqlCommand(SpName.ToString(), Program.Conn);
cm.CommandType = CommandType.StoredProcedure;
cm.Parameters.Clear();
cm.Parameters.Add("@CurrentDate", SqlDbType.DateTime).Value = DateTime.Parse(mebFromDate.Text);
cm.Parameters.Add("@RegionAuto", SqlDbType.VarChar, 8000).Value = RegionAuto;
if (Program.Conn.State == ConnectionState.Open)
{ Program.Conn.Close(); }
Program.Conn.Open();
SqlDataAdapter da = new SqlDataAdapter(cm);
ds = new DataSet();
da.Fill(ds);
sReport.Subreports["IncommingTruck"].SetDataSource(ds.Tables[0]);