Nprinting: Display first 10 rows of a table by using script
HEllo,
I am following the tutorial to build nprinting reports through pixel perfect.
I am at the part where you can limit a table to the top N rows. I've copied the code but it doesn't seem to be working.
The code is the following:
using System.Drawing.Printing; private int detailRowCount = 0; private int topNRow = 10; //number of rows to be displayed. Change this to display a different number of rows //show only the first topNRow rows private void Detail_BeforePrint(object sender, PrintEventArgs e) { if (++detailRowCount > topNRow) e.Cancel = true; }