Click here to Skip to main content
15,886,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,

I have written a student report card application but I can only print a report at a time. I want to be able to print all students report at a go.

I will be glad if anybody can help. thank you!

below is codes I tried and it only shows the detail of the last student in the table.

C#
try
           {
               for (int i = 0; i < listBox1.Items.Count - 1; i++)
               {
                   string myitems = listBox1.Items[i].ToString();

                   // TODO: This line of code loads data into the 'DataSet1.Investment' table. You can move, or remove it, as needed.
                   this.InvestmentTableAdapter.Fill(this.DataSet1.Investment, myitems.ToString());
                   // TODO: This line of code loads data into the 'DataSet1.DataTable1' table. You can move, or remove it, as needed.
                   this.DataTable1TableAdapter.Fill(this.DataSet1.DataTable1);
                   // TODO: This line of code loads data into the 'DataSet1.prcindividual' table. You can move, or remove it, as needed.
                   this.prcindividualTableAdapter.Fill(this.DataSet1.prcindividual, myitems.ToString(), "2015");
                   // TODO: This line of code loads data into the 'DataSet1.prcindividualcal' table. You can move, or remove it, as needed.
                   this.prcindividualcalTableAdapter.Fill(this.DataSet1.prcindividualcal, myitems.ToString());


               }
               this.reportViewer1.RefreshReport();

           }
           catch (Exception ex)
           {
               MessageBox.Show(ex.Message);
           }
Posted
Updated 17-Aug-15 23:35pm
v2
Comments
DamithSL 18-Aug-15 5:22am    
update the question with sample code which demonstrate how you do the printing now
Afzaal Ahmad Zeeshan 18-Aug-15 5:40am    
You cannot. Even the bulk (I would say the bulk is a list in your words) would be written one by one.

Please be more specific to get some more help, as it stands it is almost unclear!
sreeyush sudhakaran 18-Aug-15 7:12am    
Use a crystal reports to print data directly from Table or data source / database result

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900