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: 
venkat1
Creator II
Creator II

How to apply variable in the report

HI

can any one know about applying variable to the report?

5 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Mate,

provide some context what you want to do with variable etc + version of software and configuration you are using. 

Are you trying to set variable when executing report, are you trying to bring in variable value from qlik app to NPrinintg template and show it.. make some effort, describe what you want to do, specify version of nPrinitng & Qlik and maybe then we will be able to help you.

for now I can just answer: "Just apply variable in report"!

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

also study documentation:

https://help.qlik.com/en-US/nprinting/April2019/Content/NPrinting/Introduction/Introduction.htm#anch...

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.
venkat1
Creator II
Creator II
Author

Hi

i was using 

(Qlik NPrinting April 2019  Version: 19.9.5.0  )    (  qlikview november 2017 ) versions

 

i was developing in html report (please find screenshot)

there was a variable name with "vcurrentyear" how to use this variable int he html script?

i want to get current year report.

Ruggero_Piccoli
Support
Support

Hi,

As already stated by @Lech_Miszkiewicz , inserting a QlikView variable in a Qlik NPrinting template is documented in the official help site at the page https://help.qlik.com/en-US/nprinting/April2019/Content/NPrinting/ReportsDevelopment/Work-with-varia....

You can find it by yourself simply by searching for "variables" in the help site search bar. 

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Ok - that makes a lot more sense now. 

seems like you have to do below reading (especially help part of it as it explains how variables work and how they are not expanded in NPrinting)

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

and here

https://help.qlik.com/en-US/nprinting/April2019/Content/NPrinting/ReportsDevelopment/Work-with-varia...

 

here are examples of community posts regarding this:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/How-to-evaluate-a-variable-in-NPrinting/td-...

and similar here:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/QlikView-variable-in-NPrinting-problem/td-p...

 

summary:

if your variable does not contain "=" sign in Qlik then it will pass to NPrinting only static value (which in your case is probably formula)

Once you have variable with = sign declared in Qlik then just drag/drop it on report and it will return there its value.

 

Note:

If you want to use this variable to apply selection, or if you want to set a value on this variable in NPrinting as per my link from previous post this is not supported. 

 

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.