Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
May I ask you to help me for a problem. This might be easy but I didn't studied comuting science.
I'd like to export my report RP01 to PDF files. But I don't want one pdf file for all the values. I'd like to have one pdf for one value (let's say the Region)
So I made my researches on this forum but couldn't find a simple code that loops all my values for printing my report RP01. The result of the macro sould be something like this:
in C:/QlikViewReports
RP01_Brazil.pdf
RP01_USA.pdf
RP01_France.pdf
...
I'm using PDF Creator and a personal version of QV11.
I found how to print some objects to pdf by looping values but not reports.
Thank you very much for your help!
T T
Hi Thierry,
Just for you, I wrote a new blog post:
http://qliktips.blogspot.com/2012/02/printing-reports-to-pdf-using.html
Actually, I have been meaning to write this one for a while so thanks for the nudge.
Regards,
Stephen
Hi Thierry,
Just for you, I wrote a new blog post:
http://qliktips.blogspot.com/2012/02/printing-reports-to-pdf-using.html
Actually, I have been meaning to write this one for a while so thanks for the nudge.
Regards,
Stephen
It is the first time I copy paste a code and it works directly. Thank you sooo much!
Hi Stephen,
I just had a question. How do you call that macro with a button?
If you "add button" that runs a Macro and you specify the name of a Macro, QV doesn't recognize
Print_PDF(FieldValue, ReportName, ReportID)
as it is probably too long.
I created a macro called Printopdf that calls your macro but there is like a bug in QV, the macro is executed two times!
Thank you
Hi Thiery,
In a macro, I would normally have all the get values and looping in one sub (e.g. called "PrintReport()") and then this one calls print_PDF. The button doesn't allow parameters so you can only call a macro that doesn't have parameters.
Regards,
Stephen
Hi Stephen,
Let me come back to you concerning the macro. I have a problem that I can't solve. When printing more than 400 pdf reports that contains multiple objects, I mentioned that, after around 200 printings, PDF creator starts printing while Qlikview doesn't have time to display the object.
Result: from the 200th report, an object is always missing.
I can see "live" that this object appears less than 1 second (while printing) after the start of the printing process.
I tried to put a sleep time but it is not working.
Any ideas?
Thank you very much.
Hi Thierry,
Sorry, I haven't taken this macro up to that number of PDFs.
Does it make a difference on a desktop or a server?
Can you split it down to smaller groups?
Regards,
Stephen
Hi Stephen,
Thanks for your support.
For the moment, I'm using a desktop version, I can't test it as we're mainly developping BO projects. We're just starting with QV.
Interesting suggestion;
I've split the macro : 1: from record 1 to 150
2: from record 151 to 300
If I execute 1 then 2 without exiting QV, I still have the problem
If I close QV after the job of the first macro and restart it for the second one, it is working fine.
😕
Cheers,
T T
Hi Stephen,
It seems QV is storing the selection each time it select the value.
After a lot of selections, there is like an "history" to clear. Do you know a way to force QV not to save the selection value each time?
Thx
Hi Stephen,
I read your post on
http://qliktips.blogspot.com/2012/02/printing-reports-to-pdf-using.html
The macro also works with 64-bit OS?
Thx
cheers
Davide