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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Looping on sheet and Print to PDF

hi,

i have a case study here which is

i have a UserID, InvoiceID, and Month like below

UserID, InvoiceID, Month

S001, SH001, Apr

S001, SH002, Apr

S001, SH003, Apr

S002, SH004, Apr

S003, SH005, Apr

when user select UserID S001 in Month is Apr, so it will show of 3 invoiceID with the invoice detail

the case study is when user click on Print button, it able to print all invoice into 'one' PDF

i create a invoice template with a new sheet, and using button contain marco to print that sheet (name as 'PrintSheet') when user select a UserID

the problem is when i using marco to get the InvoiceID using looping method and put print 'PrintSheet' inside the looping, it will print three PDF for UserID S001 due to looping three time. but the case study is one PDF but contain three 'Printsheet' inside

Any idea on how to resolve this case study?

Regards

John Choi

Labels (1)
1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

Hi, John.

Instead of creating sheets and writing macros, you should buy a QlikView Report and config it to loop on a field.

First, create a report, then go to report Settings, Selection tab and go to banding.

This will generate one report for each possible value in the selected field in one single pdf.

As an alternative, you could make a loop on a single page.

Hope it helps,

Rgds,

View solution in original post

4 Replies
erichshiino
Partner - Master
Partner - Master

Hi, John.

Instead of creating sheets and writing macros, you should buy a QlikView Report and config it to loop on a field.

First, create a report, then go to report Settings, Selection tab and go to banding.

This will generate one report for each possible value in the selected field in one single pdf.

As an alternative, you could make a loop on a single page.

Hope it helps,

Rgds,

Not applicable
Author

Hi Erich, thank you very much. It work for my case. i got another one question related to the report setting. Since the Edit Report >Setting>Banding, The loop report over possible value in field only contain one drop down selection. it that meaning that i need to select the main Key ID for the report in order to make it to loop. In My real case study, UserID, InvoiceID is the main key for the report

erichshiino
Partner - Master
Partner - Master

You need to loop over two fields?

I think there are two alternatives:

- Create on script a field which is the combination of the two fields you need (only to use for the report)

- try to go to page setting, there should be a similar setting. I hope QlikView will make two loops, one inside another.

Not applicable
Author

Hi erich,

The Page setting is same either the way, so make a new key by combine both the necessary key would be good solution.

Thank very much for suggestion again and have nice day 😃

Regards

John choi