I'm crystal reports v 13.0.0.2
I display data in this report like this:
private ReportDocument dispatchNote;
string connectionstring = UserDatabase.getConnectionString();
using (SqlConnection con = new SqlConnection(connectionstring))
{
//Get sql
string sqlstatement = getSqlStatement();
using (SqlCommand cmd = new SqlCommand(sqlstatement))
{
using (SqlDataAdapter sda = new SqlDataAdapter())
{
try
{
cmd.Connection = con;
con.Open();
cmd.Parameters.AddWithValue("@Order_No", Order_No);
sda.SelectCommand = cmd;
DataTable dt = new DataTable();
sda.Fill(dt);
dispatchNote.SetDataSource(dt);
CrystalReportViewer1.ReportSource = dispatchNote;
}
finally
{
con.Close();
sda.Dispose();
con.Dispose();
}
}
}
}
The parameter I pass is Order_No and show the results on the report.
I want to pass a list of parameters one by one to this query and then display the results on separate pages in Crystal Reports. Passing the parameters and looping is not the problem. How to display the first result in first page, second result in second page and so on in Crystal Reports?