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: 
Chanty4u
MVP
MVP

RE:conditional report

Hi

rpc

Lech Miszkiewicz .

djk

devarasu07

i have one issue.


like   for example i have reports scheduled every month 4th [ this reports are latest month only]


so now my concern is   from database data is not uploaded this month so no reload from qlik aswell  so now in nprinting reports last month

data will send to customer which is not correct.


what is the alternate for this?    is there any trigger /conditional thing to be applied  to avoid this?




Best

Chanty

1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

There you go:

app and condition....

1.png

cheers

Lech

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.

View solution in original post

45 Replies
devarasu07
Master II
Master II

Hi,

I've not tried with Nprinting 17. in nprinting 16 method are below way

1) Connection: Create connection like our db dsn

2) report Task : try to create simple excel report using your qlikview object (here u can add filters, recipient info, attachment etc)

3) reload task: here we reload our qlikview/qvf app

4)Schedule job: create task (here we define the day/week/month schedule)

note: step 4, firstly we need to add that reload app task and then report task.

so try to find & apply similar steps in Nprint 17. are u using nov17 or earlier batch.  i heard that trigger concepts available from sep'17 nrpinting onwards.

have checked this article steps for nprint 17 job schedule,

https://branch-blog.qlik.com/nprinting-api-for-noobs-7c1343a99ad8?_ga=2.205392656.1408040715.1512034...

Thanks,

Deva

Chanty4u
MVP
MVP
Author

thanks deva.

am using 17.3 sep2017 for Qliksense

let me check . but

Devarasu R wrote:

note: step 4, firstly we need to add that reload app task and then report task.

this i dont understand deva .  what it is?   and how it will work your steps?   because if current month data is not there how it will check the condition where i have to write the condition?

devarasu07
Master II
Master II

Hi,

for the conditionally generate the report in 16, we have option in GUI @ 16 and i'm not sure about in 17

FYI, here we write all our rule (like if sales >1000 )

Capture.JPG

How to Control Report Generation with Conditions

devarasu07
Master II
Master II

hi,

This feature available in Nov'17

Conditions ‒ Qlik NPrinting

Chanty4u
MVP
MVP
Author

Hi Dev,dyn.png

17 also having the option but how can i add my condition?   

like if max month data is not there how to flag ?   which condition i have write?

any variable to create in qlik?    and how to get it?

Chanty4u
MVP
MVP
Author

got it but  i am confusing how to give the condition based on my requirement

to achieve this  if max month is not available the report should not send to the customer 

Ruggero_Piccoli
Support
Support

Hi,

QlikView has the function ReloadTime() that  returns a timestamp for when the last data load finished. Refer to:  https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/SystemFunction...

So you can create a variable, called for example IsQVReloaded that compares when last reload was done with today date. For example you can use a formula like: =(TEXT(DATE(ReloadTime(), 'YYYYMMDD')) = TEXT(DATE(Today(), 'YYYYMMDD'))). Of course you must customize the formula to met your requirements. I use this because I have a ready example that is designed to check if a .qvw is reloaded daily.

Then create a condition that is true when the variable is true. Refer to https://help.qlik.com/en-US/nprinting/November2017/Content/ReportsDevelopment/Conditions.htm

IsQVReload.png

Create a task, add the condition into the task and schedule it. The report will be created only if the condition, so the reload, is met.

If you are using a connection to a local QlikView document, remember to trigger a metadata reload otherwise NPrinting will still use the old data.

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

Agree with Ruggero in 100%

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.
Chanty4u
MVP
MVP
Author

Hi ruggero.piccoli‌ thanks alot for the suggestion and  here one more clarification 

here  i need to create this in one variable ?  =(TEXT(DATE(ReloadTime(), 'YYYYMMDD')) = TEXT(DATE(Today(), 'YYYYMMDD'))


and what is the constant here in screenshot?? hw we will declare that?