Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
curiousfellow
Specialist
Specialist

Dynamic column headers

For example:

In Qlik I have a variable called thisyear

In a chart I have an expression with label ='Sales in '& $(thisyear)

works fine. But when I use the chart in Nprinting columnheaders show the expression and not it's result.

I insert the chart as a table in Nprinting.

 

In this thread https://community.qlik.com/t5/Qlik-NPrinting-Discussions/NPrinting-17-dynamic-field-names/td-p/85732

user seems to get the result of a calculated label as Column header in Nprinting.

In my case i get the expression itself as columnheader, should I change something in Nprinting designer ?

 

 

7 Replies
pradosh_thakur
Master II
Master II

Hi @curiousfellow 

 

I think there should be no issues . Try using   ='Sales in '& $(thisyear) or  ='Sales in '& $(=thisyear) in QV and darag and drop in Nprinting. If it doesn't work. get the variable in nprinting or create a formuale , the delete the default header and  use 

  ='Sales in ' &  variable_imported_in_nprinting/formuale written in Nprinting 

Learning never stops.
curiousfellow
Specialist
Specialist
Author

I cannot see where your expression differs from mine. ='Sales in '& $(=thisyear) does not work.
Creating new variables in Nprinting is something I like to avoid, because it is double work isn't it ?
pradosh_thakur
Master II
Master II

You can import the variable already created in Qlikview into Nprinting and i don't think that will have much impact unless you have too many. I am not saying my expression is different the yours. I

Learning never stops.
curiousfellow
Specialist
Specialist
Author

Sorry, I did not mean creating new variables, I meant creating new expressions to show correct columnheaders, while they allready in exist in Qlik.

Appreciate your help by the way 🙂
pradosh_thakur
Master II
Master II

Ok . so if you want to use Qlik variable only and not to import them in nprinting, just drag that column and see the output, not the preview. If this doesn't work you have no options but to import the variable in Nprinting . You dont have to create the expression.

 

I think it will so expression only and will not be dynamic if you drag the column header. 

Learning never stops.
Ruggero_Piccoli
Support
Support

Hi,

As general rule, when you post please always specify the version of Qlik NPrinting you are using, the type of connection and the type of report you are developing. 

In any case you have two possible solutions:

- create a variable in Qlik, import it in Qlik NPrinting and drag and drop it a column name

- create a Qlik NPrinting formula and drag and drop it as column name 

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.
curiousfellow
Specialist
Specialist
Author

I am sorry not to be complete.

We are using Nprinting 17.6.0000.0 (Yes I know it is a very old version, due to shortage of manpower we did not upgrade yet, but will soon)

I am creating an excel report, and it is a local connection.

@Ruggero_Piccoli   This is indeed the way I usually create dynamic headers, but because I saw calculated headers in the thread that I mentioned first, I thought there was a way to use the calculated headers.

Thank you both.