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: 
Lakshmanudui
Contributor II
Contributor II

How to use Qliksense variables in Nprinting Edit template

Hi All,

 I have created varibales in Qliksense.

In Nprinting i am trying to edit the template but in Qliksense expressions i haved used varibales.

These varibales are not reflected in Nprinting edit template.

Qliksense side i have created expression like pick(wildmatch(Field_Name, 'Value1','Value2',Value3'),

$(vTotal),$(vSales),$(vProfit)).

I am taking this expression in Nprinting edit templae. but it is not showing data.

Can you please suggest me how to do variables in Nprinting edit template.

 

Thanks & Regards,

Lakshman

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Labels (2)
2 Solutions

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

hi, 

Lets cover basics as I think you are missing few important details... when you say:

in chart i have used dimension Like Category and Measure i have used pick(wildmatch(Category, 'Value1','Value2',Value3'), $(vTotal),$(vSales),$(vProfit)).

So you have created Qlik Sense chart/table object which has

  • dimension colum: Category
  • measure column: which evaluates expression based on your dimension pick(wildmatch(Category, 'Value1','Value2',Value3'), $(vTotal),$(vSales),$(vProfit))

Based on the Category value then variable value is comming. 

I can only partially agree to that waht you are saying as what happens is your chart dimension is taken into account when evaluating your measure expression and depending on dimension value expression is calculated. Since you are using in your expression $() sign expansion for your variables those effectively become part of your whole measure expression 

if you want to transfer this whole chart hypercube to NPrinting you can add the chart object which has yourCategory dimension and measure expression in it to a NPrintign table node and then drag and drop it  on to the template (for example excel). here you have an example:

https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ExcelReports/Create-Excel-Reports.ht...

 

On the other hand if you want to use Qlik variables directly in NPrinitng you need to know that they will basicly return evaluated single value (just like you would put your variable in Qlik Sense KPI object). You also need to understand that in order to do that your variable needs to be expanded in Qlik Sense meaning that its definition needs to start with "=" sign. I have already given you link regarding this in my previous post.

As an alternative you can use NPrinting formulas where you can call your variable (again same like in Qlik Sense KPI object where it will need to return single value). When using formulas you dont have to expand your variables in Qlik Sense as they can be expanded in NPrinitng formula directly.

I am assuming you are new to NPrinting, so I really suggest to go step by step through tutorials from help page starting from here where you can download working files: https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/Introduction/Get-started.htm and going through everything in getting started section of help page and Designing reports section. https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/QlikView-NPrintin...

This will allow you to build your understanding how NPrinting works. 

When you say: Please suggest me how to take variables in Nprinting side. Is there any possibilty to take Qliksense variables in Nprinting designer. I cannot answer that question without whole context how you can use variables. You are using your variables in objects which has dimensions and measures/expressions... When we move that to nprinting we need to take this just like it is in Qlik Sense (meaning from the table/chart object) as columns for dimension and measure and not as individual parts of your measures which in your case are $(vTotal),$(vSales),$(vProfit)). Those can be individually brought in as variables or formulas (but then withouth Category dimension context).

regards 

Lech

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.

View solution in original post

Ruggero_Piccoli
Support
Support

Hi,

I suspect that you have to create a filter to select one Category or insert the variable/formula in a level by Category.

To insert Qlik Sense variables in a template do a right click on the Variables node and select the variable from the list.

To insert Qlik Sense formulas (so by using the Sense syntax) in a template do a right click on the Formulas node and insert the formula in the editor. Formulas used in Qlik NPrinting must evaluate to a unique value. Refer to  https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Formulas.htm

I suggest you to insert the variable or the formula in the report template and run a preview so you will see the resulting value. 

Best Regards,

Ruggero

 



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.

View solution in original post

5 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

  1. Please make sure you always provide correct label for versions of software you are using. I am sure it is not version 16.0 as it does not support Qlik Sense. Can you update us with this information please.
  2. your question it is not clear. You are mentioning expressions mixed with variables and there is no indication what you are trying to do with it. NPrinting objects which are available are described here:
    1. https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Qlik-objects-supp...
    2. https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Designer-properti...
    3. https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Work-with-variabl...
      1. https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/Troubleshooting/Variables-dont-expan...
    4. https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Formulas.htm

To answer more precisesly your question we need to know what you are trying to do, what the outcome needs to be etc...

I suggest you study help and tutorials from help to understand what is possible and how you can use different features available: https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/QlikView-NPrintin...

cheers

 

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.
Ruggero_Piccoli
Support
Support

Hi,

Also adding screenshots of the template you are editing will help us to better understand your question.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Lakshmanudui
Contributor II
Contributor II
Author

Hi Lech_Miszkiewicz,

Thanks for your replay.

In Qliksense: I have created variables using exel file.

in chart i have used dimension Like Category and Measure i have used pick(wildmatch(Category, 'Value1','Value2',Value3'), $(vTotal),$(vSales),$(vProfit)).

Based on the Category value then variable value is comming.

But in Nprinitng Edit template i have taken chart data and drag and drop to category and measure and then i have preview data then data showing blank.

when i am using varibales in Edit template in Nprinting my data is not populate.

Can you please suggest me how to take variables in Nprinting designer.

I am taking Qliksense variables using variable tab in Nprinting designer. These variables are not working.

Please suggest me how to take variables in Nprinting side. Is there any possibilty to take Qliksense variables in Nprinting designer.

Thanks & Regards,

Lakshman

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

hi, 

Lets cover basics as I think you are missing few important details... when you say:

in chart i have used dimension Like Category and Measure i have used pick(wildmatch(Category, 'Value1','Value2',Value3'), $(vTotal),$(vSales),$(vProfit)).

So you have created Qlik Sense chart/table object which has

  • dimension colum: Category
  • measure column: which evaluates expression based on your dimension pick(wildmatch(Category, 'Value1','Value2',Value3'), $(vTotal),$(vSales),$(vProfit))

Based on the Category value then variable value is comming. 

I can only partially agree to that waht you are saying as what happens is your chart dimension is taken into account when evaluating your measure expression and depending on dimension value expression is calculated. Since you are using in your expression $() sign expansion for your variables those effectively become part of your whole measure expression 

if you want to transfer this whole chart hypercube to NPrinting you can add the chart object which has yourCategory dimension and measure expression in it to a NPrintign table node and then drag and drop it  on to the template (for example excel). here you have an example:

https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ExcelReports/Create-Excel-Reports.ht...

 

On the other hand if you want to use Qlik variables directly in NPrinitng you need to know that they will basicly return evaluated single value (just like you would put your variable in Qlik Sense KPI object). You also need to understand that in order to do that your variable needs to be expanded in Qlik Sense meaning that its definition needs to start with "=" sign. I have already given you link regarding this in my previous post.

As an alternative you can use NPrinting formulas where you can call your variable (again same like in Qlik Sense KPI object where it will need to return single value). When using formulas you dont have to expand your variables in Qlik Sense as they can be expanded in NPrinitng formula directly.

I am assuming you are new to NPrinting, so I really suggest to go step by step through tutorials from help page starting from here where you can download working files: https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/Introduction/Get-started.htm and going through everything in getting started section of help page and Designing reports section. https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/QlikView-NPrintin...

This will allow you to build your understanding how NPrinting works. 

When you say: Please suggest me how to take variables in Nprinting side. Is there any possibilty to take Qliksense variables in Nprinting designer. I cannot answer that question without whole context how you can use variables. You are using your variables in objects which has dimensions and measures/expressions... When we move that to nprinting we need to take this just like it is in Qlik Sense (meaning from the table/chart object) as columns for dimension and measure and not as individual parts of your measures which in your case are $(vTotal),$(vSales),$(vProfit)). Those can be individually brought in as variables or formulas (but then withouth Category dimension context).

regards 

Lech

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.
Ruggero_Piccoli
Support
Support

Hi,

I suspect that you have to create a filter to select one Category or insert the variable/formula in a level by Category.

To insert Qlik Sense variables in a template do a right click on the Variables node and select the variable from the list.

To insert Qlik Sense formulas (so by using the Sense syntax) in a template do a right click on the Formulas node and insert the formula in the editor. Formulas used in Qlik NPrinting must evaluate to a unique value. Refer to  https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Formulas.htm

I suggest you to insert the variable or the formula in the report template and run a preview so you will see the resulting value. 

Best Regards,

Ruggero

 



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.