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: 
ethanch
Contributor II
Contributor II

Reset page number after each loop in report Editor

Hi all,

I created a report and it will loop the report over a field. Everything worked fine but I want the page number to reset to 1 after each loop instead of the overall page number. 

For example, a report to show product name, product weight, product price and loop over product.

product 1                  product 2

11 g                              80g

$5                                 $10 

page 1/1                    page 1/1

 

Thank in advance. 

 

 

Labels (2)
9 Replies
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Build your pageNo at script level:

Refer qvw attached as reference.

Select PageNo report in Report Editor to view the result.

Thanks and regards,

Arthur Fong

 

ethanch
Contributor II
Contributor II
Author

Thank you for your reply Arthur.  I apologize for my misleading and over simplify example. 

In my actual report, there are a product table in a multi-page(product page), a page with graphs and calculation(graph page).  The graph page will loop over each product. The REPORT will loop over each Provider.

The product table can exceed a page depending on the provider, which why it is a multi-page.

  A full report run down could be, 

Cover page - 1 page

product page 1 - 3 pages

graph page 1 page

 

I want to reset my page number after each loop on a provider.  

Thanks

Arthur_Fong
Partner - Specialist III
Partner - Specialist III

The page for graph will be continuous from product page or starting from 1?

ethanch
Contributor II
Contributor II
Author

The page number will be continuous, until a new loop on the report level.

Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Say Provider B has 3 Products:

Your Product Page will be 

Product A : Page 1

Product B: Page 1

Product C: Page 1

What's the expected page number for the second provider in graph section?

 

ethanch
Contributor II
Contributor II
Author

in the case where provider B have 3 products, 

the page layout would be

Cover page - page 1

product a - page 2

product b - page 3

product c - page 4

graph page - page 5

Then go on to provider c with 2 products 

Cover page a - page 1

product c - page 2 

product e - page 3

graph page - page 4

 

Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Refer qvw attached as reference.

Select PageNo report in Report Editor to preview the PDF.

 

ethanch
Contributor II
Contributor II
Author

Will it work on multi-page? The graph page also include a history table that is very likely to go over a page, so it is a mulit-page. 

cover page : 1 page

product a to x : 2 - x page             x for the number of products for this provider

graph page : (x+1) to (x+i) page            i for the number of page the history table would take to fit

Reset to 1 for the next provider 

ethanch
Contributor II
Contributor II
Author

I understand doing the page number in the script part. The main issue I am facing is the multi-page, where you have a table that require more than one page to fit. Since there are not filtering or action being done, the page number variable would just be static across all pages instead of 4,5,6...

See attached for example