Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
rania_a93
New 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
Highlighted
neelamsaroha157
Valued Contributor II

Re: Loop through multiple fieldvalues and export PDF

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

View solution in original post

7 Replies
neelamsaroha157
Valued Contributor II

Re: Loop through multiple fieldvalues and export PDF

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

rania_a93
New Contributor II

Re: Loop through multiple fieldvalues and export PDF

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) !

Highlighted
neelamsaroha157
Valued Contributor II

Re: Loop through multiple fieldvalues and export PDF

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

View solution in original post

rania_a93
New Contributor II

Re: Loop through multiple fieldvalues and export PDF

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

neelamsaroha157
Valued Contributor II

Re: Loop through multiple fieldvalues and export PDF

I am glad I was able to help

darkshadow91223
New Contributor III

Re: Loop through multiple fieldvalues and export PDF

Hi Neelam,

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

Thanks!
darkshadow91223
New Contributor III

Re: Loop through multiple fieldvalues and export PDF

Hi Neelam,

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

Thanks!