Methoun Ahmed

Methoun Ahmed

  • NA
  • 145
  • 101.9k

Crystal reportviewer ask to enter parameters when click Next

Sep 3 2018 5:08 AM
Crystal reportviewer ask to enter parameters when click Next page,Export and print button.How to solved the problem.I will tried solved the problem long time.Please,help
Bellow is my code.
 
void DisplayReport()
{
crypt.Load(Server.MapPath("DetailsRpt.rpt"));
SqlDataAdapter sda = new SqlDataAdapter("RptDetails", con);
sda.SelectCommand.CommandType = CommandType.StoredProcedure;
sda.SelectCommand.Parameters.Add("@User", System.Data.SqlDbType.VarChar, 100).Value = lblUser.Text;
sda.SelectCommand.Parameters.Add("@Date1", System.Data.SqlDbType.VarChar, 100).Value = datepicker.Text;
sda.SelectCommand.Parameters.Add("@Date2", System.Data.SqlDbType.VarChar, 100).Value = datepicker2.Text;
DataTable dt = new DataTable();
sda.Fill(dt);
crypt.SetDataSource(dt);
Reportviewer.ReportSource = crypt;

Answers (1)