
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
nPrinting Condition to disregard blank reports
Hi
Hoping for some guidance here if possible. I have a set a monthly reports that cycle through a set of Agent Codes and generate a report for each, regardless of whether there was any financial activity in the given month for that agent.
I am trying to add a condition that suppresses those reports that do not have any data (in the interests of saving time and paper!)
I thought the simplest solution would be to add a condition with a Rule where the relevant variable was not equal to NULL but this does not seem to work. I have tried it using the Expression method where not equal to NULL() and other variations but it carries on cycling through all reports even if they do not have data.
Any help would be appreciated.
Thank you
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi James,
I was not adding anything to this conversation as it was hard to establish what was the actual issue in your case, what was your requirement, what worked and what didn't. I saw many different options and each of them had merit but also each of them was focused on different approach. Some were talking about reports without cycle, some were talking about levels and the way we could utilize table for that (but obviously this cannot be used with cycles), some were talking about conditions etc etc..
I will try to structure this little bit.
If your requirement is to cycle over Agent Code values and produce report only for those agent code values where there is data the only solution would be to use "Advanced search filter" to filter out "agent codes" to only those which do have data. Using "Chart has values" option in condition where your report is using cycle will not work as individual values of cycle are not evaluated in condition!
I wrote about Advanced search filters in this post: https://nprintingadventures.com/2019/06/26/nprinting-filters-part-3-advanced-search/ and I also commented on that post to explain how it works where multiple dimensions have to be filtered.
This is the easiest approach which shouldn't require additional changes in your Qlik data model. Other approaches like creating flags are also valid, but obviously require more work.
cheers
Lech

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many thanks to everyone who contributed to resolving this dilemma. I have now got this to work as desired using the Advanced Search option (as suggested by Lech).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One way to go about this is to:
- create a chart with relevant financial activity (or use existing)
- reload NPrinting Connection
- create a user filter for each user receiving the report https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/Recipients&Users/Create-users-filter...
- add your users to the NP publish task
- create condition as follows selecting the 'correct' connection ID and choosing the correct chart.
- Add this condition to the publish task
- Run the Publish task
The result should be that when publish task executes the user that has a certain agent code assigned to it, then the condition is applied to the published task, reports should only be sent to that user when the chart in the condition contains values.
Let us know if this works...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A new filter field in script may help as well, something like -
filter:
load
[Fact table keyfield]
[agent code] as [report agent code]
resident fact table
where month = current month
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Frank. I have added a chart to the exhibit which drives the report, however nPrinting doesn't seem to be picking it up in the dropdown when I try and build the new rule. is there another step I have to take in order for this to happen?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re my previous comment. It's all good, as I've reloaded the metadata. Trying the solution itself next. Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thats correct @James246
Reloading the NP connection is indeed needed when dasbhoard/app charts are added or updated.
I've updated my original response in case others follow this thread.
Cheers!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again Frank
I am not quite sure what you mean by user filter in this context. I am the only user of nPrinting here.
The agents I referred to are simply report recipients, external to our company.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Report recipients are defined as users in Qlik NPrinting also if they are external; you are sending them reports via email. So you can create filters and associate them to the related Qlik NPrinting users.
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The reports are actually printed and physically mailed. And we are talking at least 300 distinct agents, so I'm not sure if filtering for each one is really practical.
I'm just a little bemused, as all indications are that it should be simple to suppress a report which has no data and yet it seems to be very convoluted in reality.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure about the exact data model, but I feel its worth trying creating new agent code field just for reporting in the script having excluded agents not having data in the current month. Pl ignore if its not applicable in your situation.

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