
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
NPrinting Stop sending emails when no report is generated
Hi guys
I know there's other threads on this but I'm just don't understand what is going on with my NPrinting Task/ Process
I have a process that emails out an XLS attachment but I only want it to send out an email where the report does actually generate an attachment
I can see that in Qlikview, when I apply the filters that I want to apply in NPrinting, it does not find any results
IE
Vendor = T65
Arrears/Forward Flag = Arrears
Schedule Type = Schedule
As you can see, the value 'Schedule' in the Schedule Type field is grey so therefore unassociated data so when my NPrinting Task runs, it shouldn't produce any reports or send an email.
The only filters I have in place are Task filters (which I believe have the highest priority)
When I run the execute the task, it runs, but appears to fail
With the log shown below suggesting there are errors in my filters with no mention of the condition
Finally, an email is then sent out without an attachment.
I can't really create a task per supplier as there are too many so does need to be ran as a single task.
Currently Using NPrinting April 2018 (18.9.5)
What am I missing? Any help greatly appreciated.
Thanks
- Tags:
- qliksense
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The reason why the task is failing is that the filter return an empty dataset. So the condition is not evaluated in this case.
An example that works.
Create a table chart with a row for each salesman that sold more than, for example, 100.000 dollars.
Create a condition that checks if that charts has rows.
Create a filter that has results, for example Salesman = Rob and Country = UK. This filter returns many rows of incomes and the sum is greater then 100.000$ dollars. So the filter is correct, the condition is evaluated and it is true and the report is generated.
Create a filter that has results, for example Salesman = Rob and Country = Sweden. This filter returns many rows of incomes but the sum is less then 100.000$ dollars. So the filter is correct, the condition is evaluated and it is false so the report is not generated.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
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.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure when this feature was added, but in NPrinting September 2019 I can set it to not send an email if all reports fail:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
See also this Re: NP17 Conditional Task: Don’t send email if no data?.
This is the way Qlik NPrinting works now. In case of a filter error the email is sent so the final user knows that there was a filter error. Not sending the email could be misunderstood and interpreted as a lack of data.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ruggero
Thanks for your reply..There aren't any errors with my filters as far as I can see?
It runs fine with any combination of the 3 filters that I apply but when I apply all 3, its telling me that there is an error? It isn't an error, just a blank data set and the condition is set to only generate report when chart contains values.
Test 1
Supplier = T65
Arrears Filter = Arrears
Runs successfully
File produced and attached to email
Test 2
Supplier = T65
Delivery Schedule Type = Schedule
Runs successfully
File produced and attached to email
Test 3
All 3 filters applied
Supplier = T65
Delivery Schedule Type = Schedule
Arrears Filter = Arrears
We know this produces a blank data set as per Qlikview screenshot below as there are only spot orders in arrears so therefore a blank data set (not an invalid filter)
All 3 filters applied
Task fails
No mention of condition and reports an error with filters but we have seen that the filters run fine but just not all together.
And sends out a blank email, no attachment
If you're saying that a blank email being sent it now the way that NPrinting works, what is the purpose of the condition to only send report if chart contains data? This condition will never be checked as the filters will always error first?
Thanks for your help. Happy to log via support if needed?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You posted the screenshot of a warning generated because the filters you added create an empty dataset.
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But the task failed?
and this condition didn't even get checked?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, the task failed also the preview in the Designer failed if you create a filter with an empty result.
For example you create a filter with:
- salesman = Elvis
- country = Italy
but Elvis has no sales in Italy so the result of the filter is empty in QlikView. If you apply that filter to a report and run a preview it will failed.
This is the behavior of all versions at the moment (April and June 2018). I don't know if there are plans to change it in the future.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is really confusing? You are saying that an empty data set will always fail and a condition will not be checked and yet there is a condition to only run a task if the chart has values. If I'm understanding you correctly, this condition is pointless as the task will always fail before this condition gets checked? What's the point of having it in there?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The reason why the task is failing is that the filter return an empty dataset. So the condition is not evaluated in this case.
An example that works.
Create a table chart with a row for each salesman that sold more than, for example, 100.000 dollars.
Create a condition that checks if that charts has rows.
Create a filter that has results, for example Salesman = Rob and Country = UK. This filter returns many rows of incomes and the sum is greater then 100.000$ dollars. So the filter is correct, the condition is evaluated and it is true and the report is generated.
Create a filter that has results, for example Salesman = Rob and Country = Sweden. This filter returns many rows of incomes but the sum is less then 100.000$ dollars. So the filter is correct, the condition is evaluated and it is false so the report is not generated.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK.. I understand that but I think my requirement is valid too and that sometimes a supplier will have orders in arrears and sometimes not. When they do, they want to receive a report and when there is nothing to report, no email required.
Your scenario wouldn't work if it was greater than $0.00. Any Salesman that had $0.00 would fail and get a blank email right?
Any chance I can get this added as a request for future development?
Thanks for clarifying


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I understad your idea, I agree with you about this.
After starting this conversation I proposed an update about this but, of course, I don't know if the dev team will implement it.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
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.

- « Previous Replies
-
- 1
- 2
- Next Replies »