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: 
bbergstrom
Partner - Creator II
Partner - Creator II

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

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

7 Replies
Frank_S
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-...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
bbergstrom
Partner - Creator II
Partner - Creator II
Author

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.

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

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
bbergstrom
Partner - Creator II
Partner - Creator II
Author

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.

 

Frank_S
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
Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
bbergstrom
Partner - Creator II
Partner - Creator II
Author

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)

Frank_S
Support
Support

Great news @bbergstrom 

Thanks for the update!

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!