Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
gerald_lebret
Partner - Creator
Partner - Creator

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;
}

Can anyone help me please?

 

Thank you.

Labels (3)
0 Replies
Community Browser