Showing results for 
Search instead for 
Did you mean: 

How to print or preview all records separately on each separate page?

0 Kudos

I have many records to print separately on each separate page by Single Click..

Note: I am able to print Same report on single page for single record by StudentID..

but using below code previewing only first page first record, but not displaying rest of records by ClassID. a class has many records of many students.

--- the code is below....

using (SqlConnection conn = new SqlConnection(DbConnection.connectionString()))


string query = "select * From ExamResultsExtended " +

"Where classid like '%"+cboFilterClass.SelectedValue+"%' and Section like '%"+cboFilterSection.SelectedValue+"%' order by RollNo";

SqlCommand cmd = new SqlCommand(query, conn);

DataTable dtReportData = new DataTable();


SqlDataReader sdr = cmd.ExecuteReader();


ReportForm rf = new ReportForm();

rf.ReportName = @"Exam_Reports\MarksheetCardMain.rpt";

rf.dtReportData = dtReportData;

rf.WindowState = FormWindowState.Maximized;

rf.StartPosition = FormStartPosition.CenterScreen;



Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor
0 Kudos

To see all of the data, you need to remove "classid like '%"+cboFilterClass.SelectedValue+"%' and" from the Where clause.


Answers (0)