Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditional display in NPrinting (word report)

For a client, we need to implement some literary reports in NPrinting (Word-Reports), with conditional display.

So, I would like to ask if somebody has examples or tricks to realize that.

Thanks

Octave

4 Replies
Not applicable
Author

Not sure I understand the question but:

You can add variables and expressions to all reports. These will calculate at the time the report is generated and distributed, so you could have something like this in the report:

"As you can see in chart X, sales were <vHigher-Lower> in <vCurrent Year> than in <vLast Year>"

Which would populate when the report was rendered to:

"As you can see in chart X, sales were Higher in 2015 than in 2016

Not sure if this answers the question.

Anonymous
Not applicable
Author

Thanks Aran, that is interesting. Can we go further by putting a condition on sentences or paragraph?

Example: If vVariable =1, show sentence1 or paragraph 1,  If vVariable =2, show sentence2 or paragraph 2

Not applicable
Author

would it be possible to use the variable example that you have described above but use the logic in the QlikView, like in a text box to display the sentence or paragraph based on the variable and bring the text box into the word template.

another option may be to see about defining filters based on the variable and assign the filter to an object - are either of these possible solutions?

Andrea_Ghirardello

See attached qvw.

As you can imagine, you can achieve your need in different ways.

You could use different approaches based on:

  • variables: check the value of a variable and show contents accordingly.
  • different fields: load different contents on different fields and show contents according to selections. e.g. when you need to show localized contents.

As you can see I didn't use any trigger (nor macros) for perform selections or change variable values.

Using Triggers into qvw documents is not a good choice when using NPrinting because the flow is unpredictable.