Click here to Skip to main content
15,908,254 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi.I want print a list of objects and each object will be printed in new page.how can I do?
C#
var ListOfObject=new List<_object>();
for()
{
 var myobject=new _object;
 Assign"myobject"ToLablesInReport();
 ListOfObject.Add(myobject);
}
 stiReport1.Load("stiReport1.mrt");
 stiReport1.RegBusinessObject("paySlip",ListOfObject.ToList());
 stiReport1.Show();


this code just show first object
Posted
Updated 19-Apr-14 18:09pm
v3
Comments
[no name] 19-Apr-14 8:39am    
Most likely cause is that you are only adding one item to your ListOfObject list.
mit62 19-Apr-14 8:47am    
no,I do debug and ListOfObject has two different item but result in report shows first of them.

1 solution

I had forgot to set some design property.after that everything went well.

1-I assigned the DataBand which labels were in to BusinessObject.
2-
New Page After=true;
New Page Before=true;
 
Share this answer
 
v2

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