Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
shivapadala
Contributor
Contributor

Generate page number after every 35-50 lines

How can i generate page number after every 35-50 lines.
I created header, but it has to populate it after the completion of 35+ lines.
If less than that it has to populate next data.
How it can be possible, is their any logic.

Thanks in advance
Labels (3)
3 Replies
Anonymous
Not applicable

Hi
Your needs are not clear enough so I cannot give you detailed answers, however, I think you need to define a counter or generate a sequence id for each line, and populate the line number if it is 35..70..105 and so on, then will create a page number value, to check if the line number is a multiple of 35, use this expression:
row1.line_column %35==0?"do something if true":"do something if false"

Regards
Shong
shivapadala
Contributor
Contributor
Author

I have a header which is hard coded in the Tmap variable., In this header I have given page number as numeric.sequence("s1",1,1).
Coming to point, I have a report, in this I have to generate this header which has page no. 
But for data in report has 27lines, next data is having 34lines, next data is having 47lines... If data for for one is having 24lines and next data is having lines of 20lines, totally 44lines which is <50. After 20lines of data it should not populate header. 
But I need to populate header only after if lines are >35 and <50...

Thanks in advance 
Anonymous
Not applicable

There should be a line number for each line, if it does not exist, add a new column as line_number on tMap and set its value expression as numeric.sequence("s1",1,1), on another tMap, check the line number if it is >35 and <50, eg:
row2.line_number>35 && row2.line_number<50?"value if true":"value if false"