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: 
Lauri
Specialist
Specialist

Variable misbehaved once

I have an NPrinting report that runs every Sunday morning. It's been working perfectly for a few months - until yesterday. The report name includes a variable from Sense that evaluates this: 

=date(WeekStart(Today()), 'YYYY.MM.DD')

The report setup:

Lauri_0-1717429591087.png

 

Every week, the report has gotten the correct name. Yesterday, the report ran as usual BUT the file name contained 2024.05.26 instead of 2024.06.02 (yesterday's date). 

Any ideas why?

I could change the variable to =date(Today(), 'YYYY.MM.DD') but it's not ideal because sometimes the report needs to run on other days.

Labels (2)
3 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Lauri 

It is not possible to tell why it shown different date without investigating. First you would need to check your Qlik Sense app as well as the variable value returned for that variable (preferably at the time when you generated report).

 

 

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.
marcus_sommer

It might be related to the timer_mode of today() and the time of the last reload: today - script and chart function | Qlik Cloud Help

Lauri
Specialist
Specialist
Author

Thank you for your ideas. The timer_mode is good to know about. I don't provide a value for that parameter, so I assume the default (1 - the date of the function call) will return the date of the day NPrinting runs the report. Even if it somehow returned the date the app reloaded, then I should see the problem every week, because the app never reloads on Sunday (which is the start of the week in our environment).