Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I am trying to automatically save various reports as pdf. Reports should have different file name. May i kindly ask how to do it in qlikview.
I appreciate your help.
Regards,
i have attached the macro! First it selects 2014 and then loops through BusGrp, then selects 2015 and loops again through BusGrp,
then selects 2016 and loops again through BusGrp :
Tested with your former attached qvw.
works fine for me!
You could use a specialized tool like QlikView NPrinting or something like this: Print Report to PDF with open source PDFCreator.
- Marcus
You could also use a vbs-macro in order to export your charts/tables into one or more predefined PP-Templates.
Inside the vbs-code you could also make the filename of the PP-Template dynamically e.g. adding a timestamp or other logic to the filename and determine where to save the reports. If this is something that fits your needs then let me know for further assistance.
Thanks Marcus / Franc for your reply.
Below is the sample of the code:
ActiveDocument.Fields("Company").select "Name of Company"
ActiveDocument.Fields("Year").Select "XXXX" // where XXXX is the year
ActiveDocument.PrintReport "RP01", "PDFCreator"
I have 20 or more listed company and i need to print each company's financial for several years, let say from 1990's to present. where report for each year and each company is required.
What i need is the syntax to auto save the report and save it with different filename automatically.
Regards,
You need to loop through your field. Here is an example for exporting objects to excel - but the logic is the same like your printing-task.
- Marcus
Hi Marcus,
Thanks. Please send an example. looping is fine but what i cannot understand is how to save it with different filename (automatically)
Regards
Dear Frank,
Thanks...Please share sample codes as it fits my requirements..
Hi Roberto,
I have attached an example for exporting/creating multiple PP-reports dynamically!
You will just have to adapt the paths inside the vba code in order to get it work in your environment!
This macro loops through every sheet of you qlikview document and exports the relevant charts -->
(for setting up the PPTemplate you will have to copy the relevant chart (e.g. CH01) once into the PP Template and name the object like this: Document\CH01). The macro also loops through the fields "company" and "year" and it creates a new Report everytime when the one loop is finished.
hope this gives you an idea on how to get started!
Frank
are you on personal edition?
Thanks Frank. I will check the zip file and get back to you.
Yes, i am currently using the personal edition.