Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

dynamically save various reports as pdf with different filename


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,

79 Replies
Not applicable
Author

One other question.

Is it possible to have the template similar to "Exporttemplate.pptx", instead of defining the position of the chart i.e. in your macro .Left = 400 ; .Top = 10

Regards

Frank_Hartmann
Master II
Master II

then you will have to go with the macro which loops through your sheets!

With this macro you can call the prepared template! try it with the corrected fieldnames.

this should work too!

I´m glad that it finally worked for you!

please mark the correct answer to close this thread!

Not applicable
Author

I did marked the correct answer,

one more request - Is it possible for you to help in modifying the macro where it uses the "Exporttemplate.pptx" but will not loop in all of the sheets but only to a defined sheet/s in the macro.  I appreciate if you could assist me on this as I am really not expert in using macro.

Regards

Frank_Hartmann
Master II
Master II

I will try adapting the macro but i guess it will take some time and today im busy.

I will reply to you not later than tomorow!

Not applicable
Author

thanks so much.

Frank_Hartmann
Master II
Master II

Ok Roberto,

I changed the code, so it will now select SH29 only.

in order to get this macro working you will have to be careful with following things:

1. In  the powerpointdocument the charts need to be named like this: Document\CH551 -->if your QV objectID is CH551.

    Please adjust this for all the exported bitmaps inside the Powerpointdocument/slides

2. Inside the macro code you only need to adapt the path of the template and the path in which the generated reports should be saved.

    If your QV sheet (with the charts) is not SH29 then you will have to change this to inside the code too (preconfigured to SH29)

3. And of course you will need to change the BusGrp Field with the correct one!

The new code is attached. I also attached the template, but here the IDs are preconfigured to:

Document\Chart1,

Document\Chart2,

Document\Chart3,

Document\Chart4,

Document\Chart5,

so you will have to change this according Point 1.) in order to use this attached template.

hope this helps.

If its not working leave a message!

Frank

Not applicable
Author

thank you so much Frank.  work perfectly....

Not applicable
Author

Frank,

I may be asking too much but I kindly need your further help.  

Reference to the sample qv that I have sent you plus the latest macro that you did,  I need to move to the next phase of my requirements using macro.

Each pptx file save should have the following:

       1.  first file with three slides from 3 different sheets  (let say SH29, SH30 and SH31) in qv.  it should select  the year (base on year selected in qlikview) to serve as the summary for the 6 companies.  so basically, the file should be save as "year.pptx".

       2.  based on the selected year, (in qlikview) macro now will select the first company for the same year, (where the pptx template has charts from 3 sheets (let say SH29, SH30 and SH31), then save the file as BusGroup Year.pptx.   after saving, move to the next company keeping the same year as selected in qlikview.

So once done, you could put all the slides together as follows:

     1st file save as the summary for the year

      2nd and up to the 6th file save (as BusGrp year) will save as the details of each company

hope I explain it well and I hope it is possible to achieve.  otherwise, what you have previously sent works fine.

I appreciate your  help.

Regards,

Frank_Hartmann
Master II
Master II

Ok, as far as I understood now:

1. you dont want to select SH29 but looping through the sheets searching and exporting the connected items?!?

2. In addition to what we achieved right now you want to show a summary presentation for the years only?

If this is what you want you will have to change the macro like the attached one.

I added a function, actually the same code like for the company+year report but without selecting in BusGrp. In addition to that the macro now loops through every sheet of you QV document and if there is an chart for which you have setup up the connection to the powerpoint document then the macro will export this chart within one loop! Within the next loop it will export the chart to the next PP-presentation according the actual selections.

Hope this helps

Note: You can also mark answers as helpful.

Not applicable
Author

Frank,

Thanks for your reply.

1. You don't want to select SH29 but looping through the sheets searching and exporting the connected items?!?

      Not looping to all of the sheets available but to specific 3 sheets only.  Let say I have 10 sheets, I want the macro to check only from the 3 sheets)

2. In addition to what we achieved right now you want to show a summary presentation for the years only?

    Yes please.  What we have done in our report is to have per company per year.  I also need the total report per year (meaning without selecting any company but only the year)

Regards,