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: 
manoj2102
Contributor III
Contributor III

Nprinting Dynamic Filter based on field values

Greeting.!

I want to send report via Nprinting based on schedule below.

So if today is Tuesday I need to send report to users for only data in my QS report  for date of coming Thursday.

If today is Wednesday I need to send report to users for only data in my QS report for date of coming SAT,SUN,MON.

and so on as mentioned below in table.

Nprinting Schedule on

Mail to be sent for Date/ Day

Monday

Thursday

Tuesday

Friday

Wednesday

Saturday , Sunday , Monday

Thursday

Tuesday

Friday

Wednesday

 

 

Labels (4)
1 Solution

Accepted Solutions
manoj2102
Contributor III
Contributor III
Author

Thanks Ruggero  & Lech for your reply . Both were helpful an i'm able to achieve the same  by using combination of script in app and Filter in NP

Script

If(WeekDay(Date)='Mon','3',
If(WeekDay(Date)='Tue','4',
If(WeekDay(Date)='Wed','5',
If(WeekDay(Date)='Thu','1',
If(WeekDay(Date)='Fri','2',
If(WeekDay(Date)='Sat','3',
If(WeekDay(Date)='Sun','3')))))))as schedule

 
 

In NP

Evaluate value field Filter as 

Pick(Match(weekday(today()),'Mon','Tue','Wed','Thu','Fri'),'1','2','3','4','5')

 

Apply the same in Report template 

 

Regards

Manoj D. 

 

View solution in original post

4 Replies
Ruggero_Piccoli
Support
Support

Hi,

You can create a filter that evaluates the value like explained in https://help.qlik.com/en-US/nprinting/February2020/Content/NPrinting/ReportsDevelopment/Static-dynam...

In the same page you will find also the explanation of the advanced filters.

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

....or

If you are not familiar with NPrinting, create a flag in your Qlik load script to apply required filtering and then in NPrinting you won't need dynamic filter anymore, but just static filter: Flag: numeric value=1

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
manoj2102
Contributor III
Contributor III
Author

Thanks Ruggero  & Lech for your reply . Both were helpful an i'm able to achieve the same  by using combination of script in app and Filter in NP

Script

If(WeekDay(Date)='Mon','3',
If(WeekDay(Date)='Tue','4',
If(WeekDay(Date)='Wed','5',
If(WeekDay(Date)='Thu','1',
If(WeekDay(Date)='Fri','2',
If(WeekDay(Date)='Sat','3',
If(WeekDay(Date)='Sun','3')))))))as schedule

 
 

In NP

Evaluate value field Filter as 

Pick(Match(weekday(today()),'Mon','Tue','Wed','Thu','Fri'),'1','2','3','4','5')

 

Apply the same in Report template 

 

Regards

Manoj D. 

 

Ruggero_Piccoli
Support
Support

Hi,

Thanks for sharing the solution with the whole community. This will help many other people in the future.

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.