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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Automating PDF reports creation?

Hi all,

Just wondering if anyone can advise....

I have Qlikview installed on my computer. I have created a set of dashboards for which I would now like to create pdf files from. For each pdf file, I would like to select a specific value within a dimension. I know I can do this manually but I would like to automate this whole process. So for example, say I have an 'Employee Name' dimension that has 100 different employee names. I would like to automate the creatation of pdfs, one pdf file per employee name (in this example it would be 100 pdf files).

Can this be done/automated within Qlikview? Or do I need something like Publisher?

Regards

Revlin

9 Replies
Anonymous
Not applicable
Author

The short answer is "Yes", you can do it from a QlikView developer client.

To make it simple, let's say you have a report with the objects you want to print to PDF looping through possible values in a field (it's almost the same if you want to print an object directly rather than via a report).

You write a macro that

1) Edits the registry to suppress the Print dialogue, e.g. using QlikViewPDF, search WSHShell.RegWrite in the community

2) Get possible values of the desired field, "Employee Name"

3) Loops through the values one by one, while

     a) selects the value in Employee Name

     b) creates a path and filename to where the pdf is stored, probably including your Employee Name

     c) write to registry the path\filename created in b) to print registry

     d) print report by PrintDocReport or other report print command, see APIGuide or community

  Next Employee...

Hope this puts you on the right track.

/Nicolai

vikasmahajan

PFA application and you can mail to employees.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Anonymous
Not applicable
Author

Also see this, using QLikViewPDF and Bullzip: QlikView Makro PDF Print with BullZip PDFCreator QlikViewPDF » BEEYE

Not applicable
Author

Hi Vikas,

I have BullZip Printer Installed on my machine.

I downloaded your document (qvw) file.

But somehow the macro in it seems to print just one specific chart (Issues by Module) in it.

It does not run when i change the report ID from RP01 to something else.

And one more question : The chart that gets successfully printed has ID CH01 and not RP01. But still the macro prints this chart. Howz that possible ?

Thanks in Advance

Sagar

Not applicable
Author

I already did something close to what you want, but in my case I was sending the pdf files by email. I will put a little part of my macro code to you get the idea.

Sub sendPDFByMail

  myFieldName = "sample"

  fileName = "PDFSample"

  createTempFolder "C:\TempQlikView\"

  generateDate formattedDate

  Set possibleValues = ActiveDocument.Fields(myFieldName).GetPossibleValues

  For i = 0 To possibleValues.Count - 1

  ActiveDocument.Fields(myFieldName).Clear

  ActiveDocument.Fields(myFieldName).Select possibleValues.Item(i).Text

  generatePDFFile fileName & possibleValues.Item(i).Text, formattedDate

  sendMail fileName & possibleValues.Item(i).Text, formattedDate

  Next

  MsgBox("Emails send")

  deleteTempFolder("C:\TempQlikView\")

  End If

End Sub

Not applicable
Author

Hi All ,

I have been able to create PDF Reports using a macro that i found in one of the blogs.

But i have one more question : Does every user need to install the 3rd party PDF printer (BullZip Printer or QlikViewPDF) on his/her system or just installing it on the server would do the job?

Thanks in Advance.

Sagar

Anonymous
Not applicable
Author

The machine running the macro, altering registry, creating the pdfs, need the pdf printer driver.

Did you get automation to work on the server? Just curious...

Not applicable
Author

I havent yet tried it on the server. But it works just fine on my client. Will keep you posted about after trying it.

nizamsha
Specialist II
Specialist II

I guess Excatly what u want PFA.