Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
hugmarcel
Specialist
Specialist

Attach recipient specific existing PDFs to NPrinting message.

Hi
we are using NPrinting 16.

How is it possible to attach recipient specific, already existing, pdfs to an email message?

Example:
- Recipient 1 should get message with x1.pdf attached.
- Recipient 2 should get message with x2.pdf attached.
- Recipient n should get message with xn.pdf attached.
etc.

I found this thread, but it deals with static attachments only:
https://community.qlik.com/t5/Qlik-NPrinting-Documents/Can-I-attach-external-files-to-NPrinting-e-ma...

And it is not possible to re-create the PDFs with NPrinting.

Thank you - Marcel

1 Solution

Accepted Solutions
hugmarcel
Specialist
Specialist
Author

Hi

I now found a solution how to do it.

I do not use the standard NPrinting Message functionality. I create a QlikView macro using the CDO.MESSAGE VB object. It allows to attach PDFs etc. to an Email.

After having created the NPrinting reports, I call the QlikView macro which creates the user specific emails based on NPrinting Report Data and QlikView macro Attachments.

This works fine and gives greate flexibility.

Regards - Marcel

View solution in original post

7 Replies
Frank_S
Support
Support

Hi @hugmarcel 

The linked solution you share is the correct solution for distributing not only NPrinting reports using NP 16 but also can be used for any attachable files that might be relevant for distribution with the report. Yes the file you are attaching is static. However, what you can do is assuming you are attaching:

1. Create a daily NP Report distribution task to the same folder where the file is currently stored.

2. Use a batch file and windows task scheduler to move or copy files from your source folder to a different folder daily before NPrinting report distribution is to take place.

This will allow NPrinting to distribute the same attached file/name but it is essentially a new file even though it is the same name. 

On your other point...Note: It is also possible to recreate NPrinting reports if the data exists and if the original NP report template exists. Or you can create a new report from the NP designer that is similar to your earlier reports if the original report template no longer exists. 

I'm not certain I fully understand your requirement but perhaps the ideas above might guide you in the right direction... perhaps others in this forum might have another solution for if this above is not what you are looking for.

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
hugmarcel
Specialist
Specialist
Author

 Hi Frank
 
 thank you for the answer. It looks like recipient specific external attachments are not possible. See:


 https://community.qlik.com/t5/Qlik-NPrinting-Discussions/Attaching-External-Files-xlsx-ppt-in-NPrint...
 
 Ok, you can use the trick to define a static file name as attachment in the message definition.
 
 But I do not find a way to change the content of this file while a report task with different recipients is being running.
 
 It should be like:
 a.) Message 1 for recipient 1 is created, having static file attached
 b.) Now Change file content of static file
 c.) Message 2 for recipient 2 is created, having static file attached
 d.) Now Change file content of static file
 e.) Message 3 for recipient 3 is created, having static file attached
 etc.
  
 Thank you - Marcel

hugmarcel
Specialist
Specialist
Author

We find that changing the attachment file between creation of (html) email files is not possible.

All the html mails are created first, and the same attachment is added only AFTER the files
have been created.

Really a pity, think we have to change the reporting tool.

Marcel

Ruggero_Piccoli
Support
Support

Hi,

Recipient specific external attachments are not possible in QlikView NPrinting 16 and they will be never implemented because this is the old series.

This could be requested as a new feature on Qlik NPrinting 17+ serie (at the moment latest is April 2019), for example by suggesting it to your Qlik partner.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
hugmarcel
Specialist
Specialist
Author

Hi

One trick I try to use now is to overwrite a word template whenever a field value (KUNDENID) is being changed in QlikView.

-> NPrinting: Apply KUNDENID filter.
-> QlikView field trigger: Change the NPrinting template with a KUNDENID specific version in a QlikView macro.

Having two sequential filters 24730 and 22790, this is what happens:

a.) 24730 filter is applied, word template is created by QlikView trigger.
b.) NPrinting uses the word template created by QlikView trigger macro. FINE!
c.) 22790 filter is applied, word template is overwritten by QlikView trigger.
d.) NPrinting: In final report for 22790, still old word template content with 24730 is being used, and not 22790.
      NOT FINE!

Any idea what could cause d.)? If I check the word template after NPrinting RUN, it contains correct value as for 22790.

Kind regards! (see attachment as well)

Marcel

Ruggero_Piccoli
Support
Support

Hi,

I think you need to kill all the Qv.eve and QlikView NPrinting processes before to proceed with point c). I suppose this will force the template re-upload so the new one will be used.

In any case this is not a supported solution, so there are no warranties that it works. 

Remember also that QlikView NPrinting 16 will reach its end of life (see https://support.qlik.com/articles/000033679) so evaluate if your effort to develop this solution is payed by the remaining life of the product or if it is better to migrate to Qlik NPrinting 17+.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
hugmarcel
Specialist
Specialist
Author

Hi

I now found a solution how to do it.

I do not use the standard NPrinting Message functionality. I create a QlikView macro using the CDO.MESSAGE VB object. It allows to attach PDFs etc. to an Email.

After having created the NPrinting reports, I call the QlikView macro which creates the user specific emails based on NPrinting Report Data and QlikView macro Attachments.

This works fine and gives greate flexibility.

Regards - Marcel