Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Loop through multiple fieldvalues and export PDF

Hello,

I have to export a pdf by selecting multiple fields values.

I have to loop through 2 fields: CONTRACT and YEAR

Let's suppose :

Contract                 YEAR

A                              2010, 2011

B                              2011,2012

C                              2014,2015,2016,2017,2018

Please note I don't have a Nprinting Licence, so what I did is : I generated a simple PDF Report in which I copied my objects ( 1 table + 1 bar chart).

I used the report banding option to loop through the multiple values of YEAR and then a small vb script to loop through CONTRACT (see attached files).

The result is : 3 PDF Files  (1per contract) with mulitple pages (1 page per year)

  • PDF1 : Contract A -  2 pages (2010, 2011)
  • PDF2 : Contract B -  2 pages (2011,2012)
  • PDF3 : Contract C -  2 pages (2014,2015,2016,2017,2018)

What I am looking for is a way to merge all the pdf files into one single PDF, the only way I found to do it for now is manually by clicking on "Wait and Collect" and then combine the PDFs.

PS; I use PDFCreator as printer for the report

Is there any function, VB script or option to do it ?

Thanks a lot 😃 !

1 Solution

Accepted Solutions
Specialist II
Specialist II

check this sample application which loops through 2 fields while creating a single pdf.

View solution in original post

7 Replies
Specialist II
Specialist II

Did you try the 'banding' option for the page?

Contributor II
Contributor II

Hello Neelam,

Thanks for ur reply !!

Yes, I did it but only for one field.

As I have to loop through two fields, I did a loop using a vb macro to loop through the second field (which generates several pdf files) !

Specialist II
Specialist II

check this sample application which loops through 2 fields while creating a single pdf.

View solution in original post

Contributor II
Contributor II

Thanks a lot Neelam, it's exactly what I was looking for

I never knew you can loop through a field in the report page settings !

Thanks again for your help

Specialist II
Specialist II

I am glad I was able to help

Contributor III
Contributor III

Hi Neelam,

i wanted to try your solution but the macro module seems to be empty.
Could you please upload it again please?

Thanks!
Contributor III
Contributor III

Hi Neelam,

i wanted to try your solution but the macro module seems to be empty.
Could you please upload it again please?

Thanks!