Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I've got some header text that I would like to include in an NPrinting Excel report. It looks something like this in my Data Load section of Qlik Sense.
LET Today = timestamp(daystart(timestamp(today())) + maketime(6))
;
LET Yesterday = timestamp(daystart(timestamp(today()-1)) + maketime(6))
;
SET HeaderText = On-Time Exception Report for $(Yesterday) to $(Today)
I've tried pretty much everything including creating a variable in NPrinting and I alway get this.
Error: Garbage after expression: 'Exception'
What can I do to make my header get calculated properly.
Any help is greatly appreciated.
Try This & then just use variable in your NPrinitng Template
LET Today = timestamp(daystart(timestamp(today())) + maketime(6));
LET Yesterday = timestamp(daystart(timestamp(today()-1)) + maketime(6));
LETHeaderText = CHR(39)& 'On-Time Exception Report for '& '$(Yesterday)'&' to '&'$(Today)';
Did you try:
LET HeaderText = 'On-Time Exception Report for $(Yesterday) to $(Today)';
Try This & then just use variable in your NPrinitng Template
LET Today = timestamp(daystart(timestamp(today())) + maketime(6));
LET Yesterday = timestamp(daystart(timestamp(today()-1)) + maketime(6));
LETHeaderText = CHR(39)& 'On-Time Exception Report for '& '$(Yesterday)'&' to '&'$(Today)';
Thanks Lech,
I think the main difference is that I have "SET" where you have "LET". Once I dropped that in using your example it worked as I expected it to.
no worries,
Note also that by adding CHR(39) at the beggining of Header Text effectively we are producing string auch as:
'On-Time Exception Report for 11/05/2017 6:00:00 AM to 12:05/2017 6:00:00 AM.
The " ' " (single quote character) once moved to excel changes cell type to Text, so excel does not try to calculate formula like "=On-Time......"
hope this helps
regards
Lech