Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

NPrinting Not Previewing Variable Value

I'm creating a Word template for a Qlik Sense app and the variable I pulled into the template is not displaying the value.  If I pull the variable into either the header or body all it does is display the formula and not the value when I try to preview.

Labels (2)
1 Solution

Accepted Solutions
Highlighted
Support
Support

As  indicated in the article under scenario 2, you need to create a second identical variable with a slightly different name.

For example:

  • VarApp1: where sum(sales) is the variable definition. This is the original variable, and remains unchanged.
  • VarApp1b: where =sum(sales) is the variable definition. This new variable can be used in Qlik NPrinting in the cases described in Scenario 1.

Use the second variable for your reporting purposes and do not change the original. After creating the new variable in the Sense app, you will need to reload the metadata for the NP connection to the sense app that the new variable was created. This is necessary step to be able to utilize the new variable in the NP designer/report template.

We are just 'like' you and like to be liked when providing a helpful answer. You may also press the 'Solution Accepted' button if an answer provided resolves your question or issue... Cheers!

View solution in original post

7 Replies
Highlighted
Support
Support

Check all three scenarios in the link below but I believe scenario two 'might' apply to you.

https://help.qlik.com/en-US/nprinting/February2019/Content/NPrinting/Troubleshooting/Variables-dont-...

We are just 'like' you and like to be liked when providing a helpful answer. You may also press the 'Solution Accepted' button if an answer provided resolves your question or issue... Cheers!
Highlighted
Partner
Partner

This is the variable in question:

IF(Max($(vCountryUS))=1,'US',IF(Max($(vCountryCA))=1,'Canada','Mexico'))

Do I need to change it to:

=IF(Max($(vCountryUS))=1,'US',IF(Max($(vCountryCA))=1,'Canada','Mexico'))

If so then it does not work correctly in the app.

Highlighted
Support
Support

As  indicated in the article under scenario 2, you need to create a second identical variable with a slightly different name.

For example:

  • VarApp1: where sum(sales) is the variable definition. This is the original variable, and remains unchanged.
  • VarApp1b: where =sum(sales) is the variable definition. This new variable can be used in Qlik NPrinting in the cases described in Scenario 1.

Use the second variable for your reporting purposes and do not change the original. After creating the new variable in the Sense app, you will need to reload the metadata for the NP connection to the sense app that the new variable was created. This is necessary step to be able to utilize the new variable in the NP designer/report template.

We are just 'like' you and like to be liked when providing a helpful answer. You may also press the 'Solution Accepted' button if an answer provided resolves your question or issue... Cheers!

View solution in original post

Highlighted
Partner
Partner

Would it work if I did this:

VarApp1 - Sum(Sales)

VarApp1b - =Var1

Having two almost identical variables might increase the potential maintenance if we need to change the expression in the future.

 

Highlighted
Support
Support

@bbergstrom
You certainly can try but if it comes down to it and that doesn't work, you will likely need to follow the supported method in order to meet your reporting requirement.
For more information please visit https://support.qlik.com/articles/000045525
We are just 'like' you and like to be liked when providing a helpful answer. You may also press the 'Solution Accepted' button if an answer provided resolves your question or issue... Cheers!
Highlighted
Partner
Partner

Thanks for your help Frank.  I tested it out and I was able to reference the original variable with the new one and it worked! 

 

VarApp1 - Sum(Sales)

VarApp1b - =$(Var1)

Highlighted
Support
Support

Great news @bbergstrom 

Thanks for the update!

We are just 'like' you and like to be liked when providing a helpful answer. You may also press the 'Solution Accepted' button if an answer provided resolves your question or issue... Cheers!