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: 
EISSA
Contributor III
Contributor III

Hide Columns in NPrinting Excel Template

Hello,

Is there a way to hide columns in an NPrinting Excel Template?

I know that the columns can be conditionally hidden in the source Qlik Sense chart, but I need to control it from Nprinting Template.

Any suggestions how this can be done in NPrinting?

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @EISSA 

As @aeveltstra said you cannot control if column is entered into template from NPrinting side, or whether column is hidden or deleted. Instead you can use:

  • excel macro to delete column based on parameter added to template
    • note that this will only work if macro is executed after document is opened by user
  • you can have qlik sense/qlikview  formula which conditionally returns no values in column which needs to be hidden. In reality column is still there but empty. Same can apply to its label which can be done by use of nprinting formula
    • If(vHide=1, "", measure expression)

 

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

3 Replies
aeveltstra
Contributor III
Contributor III

It depends on how you display the chart.

If you drop the entire chart into the template, and have it expand its range, then the template cannot hide or show columns inside of that range. You would need the chart to hide dimensions conditionally, in the Qlik document, but conditionals are not supported in NPrinting.

If, instead, you drop individual columns from the chart into the template, then you can use regular Excel formatting to hide a column. In order to do it based on conditions, I fear using a macro is your only option. But you can make the text appear invisible by using conditional formatting to change the text color to match the cell background color.

EISSA
Contributor III
Contributor III
Author

@aeveltstra  thanks for your reply.

In my case I am talking about hiding columns from a table in Excel Nprinting table.

by any chance do you know if I can use an if condition based on a variable sent to the excel template in the conditional formatting to hide the column or the conditional formatting works only based on the result in the field itself ? 

can you please send me more details how to solve it using the conditional formatting thing ? 

thanks.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @EISSA 

As @aeveltstra said you cannot control if column is entered into template from NPrinting side, or whether column is hidden or deleted. Instead you can use:

  • excel macro to delete column based on parameter added to template
    • note that this will only work if macro is executed after document is opened by user
  • you can have qlik sense/qlikview  formula which conditionally returns no values in column which needs to be hidden. In reality column is still there but empty. Same can apply to its label which can be done by use of nprinting formula
    • If(vHide=1, "", measure expression)

 

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.