Forms inside NPrinting Extension Objects accept QlikView formulas as an argument. You’ll learn in this tutorial how to use them to select recipients and send reports. We’ll display a list box containing recipients in a QlikView document to let users select one or more recipients. Users select recipients the same way they select QlikView filters. Click on an NPrinting Task Extension that retrieves the names of the selected recipients and sends them filtered reports.
The steps are:
Create recipients in NPrinting with filters
Create an NPrinting task that sends a report via email
Load a list of recipients into the QlikView document and display their names
Create an NPrinting Task Extension that runs the task
The NPrinting Training Material contains a working example for this tutorial. Please download NPrinting Training Material if you haven't recently done so, and extract it into C:\NPrintingTraining\ so that the relative path structure continues to be valid.
Create New Recipient
Open the NPrinting document, OnDemand.nsq, in C:\NPrintingTraining\NPrintingFiles\
Add a recipient named Elvis Presley
Add a filter for Salesman=Elvis Presley
Set an email address that you can read
Save and New
Create a Second Recipient
Add recipient Rob Carsson without filters
Set an email address that you have access to
Save and Close
Create an NPrinting Task
Create an NPrinting task named Task Send Top 25 Products with Current Selections.
Save and close the task. Click on YES on the warning message that asks you to insert at least one recipient: you can leave the Recipients List empty. Save the NPrinting project.
Load Recipients into the QlikView Document
Now, we can load our new recipients into the QlikView document using the load script. If you use NPrinting's features for importing recipients, you can develop a QlikView load script that loads recipients from a source file. See: How to Import Recipients from QlikView Documents - Features Track. You cannot import recipients directly from NPrinting to QlikView or vice versa at the present time.
Add Additional Recipients to Script
Open the SalesDemo for Ajax.qvw document in C:\NPrintingTraining\QlikViewDocuments\
Report ID: Task Send Top 25 Products with Current Selections
Connection ID: Sales Demo
Additional recipients: insert the QlikView formula =GetFieldSelections(FullName). This formula returns the selected active recipients and sends them to NPrinting Service, so it will send them the reports. Dynamic selection is obtained using this QlikView formula.
Configure Filter Settings
Click on the Filter settings bar
Use current selections: check marked
Close the Properties editor
Save the QlikView document
Send Report to a Recipient
Select an additional recipient, Elvis Presley for instance
Click "Task Send Top 25 Products with Current Selections"
When the NPrinting Queue button shows that the task has completed, check the e-mail account that you've associated with the Elvis recipient and you’ll find the report.