Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a report scheduled Mondays that includes last weeks data. In the file name, I'd like to include the name of last week, i.e. for example "Weekly Sales Report 2019/38".
I have this variable set up in QlikView:
SET vWeekNameReport =weekname(today()-1)
This variable is added to the report Dynamic name/Qlik variable
But the file displays the content of the variable rather than the week name: "Weekly Sales Report_weekname(today()-1)"
We are running NPrinting 19 February 2019 SR1 and QlikView 11.20 SR 18.
Thanks in advance
Regards,
Anders
Hi,
this means that you are putting = sign in front of first variable and not the second variable
simply use one variable for this exercise and again - note the "=" sign which you did not have in front of your variable expression
SET vWeekName_LW = "=Replace(Text(WeekName(Floor(ReloadTime())-1)),'/','-')";
Hi,
This topic is very well documented with youtube tutorials and official documentation. Please read help to understand why you get a content of variable instead of actual evaluated value - link below.
and also here
also here
https://www.youtube.com/watch?v=3HFdrqsbQlk
you are missing the most important thing: "="(equal sign) in front of your variable so it can evaluate!!!
Just to follow up - my examples show you how to use variable in message subject etc.. but princliple is the same as variable needs to be evaluated....
Thanks Lech! And thanks for the examples.
The = sign is present in the variable "=weekname(today()-1)" . I have tested using a simple date variable like
"= Date(Floor(Now()))" and it works. I'm thinking it's a problem with evaluating the WeekName syntax in my current variable (or MonthName/YearName)?
What do you think?
Could be the fact that WeekName returns 2019/38 which would be a non supported file name. How could I amend the variable to change the "/" to a "-"?
How about replace($(variable),’/‘,’-‘)
Thanks. I created these two variables:
SET vWeekName_LW = WeekName$(vReloadDate)-1;
SET vReport_LW = replace($(vWeekName_LW),'/','-w');
but it still does not do the trick unfortunately:
Output pdf file name: Weekly Report_replace(WeekName2019-09-24-1,'_','-w').pdf
what I want to see here is rather Weekly Report_2019-w39.pdf
any ideas?
Hi,
this means that you are putting = sign in front of first variable and not the second variable
simply use one variable for this exercise and again - note the "=" sign which you did not have in front of your variable expression
SET vWeekName_LW = "=Replace(Text(WeekName(Floor(ReloadTime())-1)),'/','-')";
Worked perfect, thanks Lech!
No worries mate!