MAK
MAK

Reputation: 1298

Crystal Report data on multiple pages

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?

Upvotes: 0

Views: 2512

Answers (1)

Emanuele Greco
Emanuele Greco

Reputation: 12731

Result will be prompt using "Details" section, I do suppose.

Go to Section Expert choose the section you intend to set, then Paging and then New Page After

Upvotes: 1

Related Questions