Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

NPrinting PixelPerfect - How to use Formula in Formatting Rules

cancel
Showing results for 
Search instead for 
Did you mean: 
Dadiop
Contributor II
Contributor II

NPrinting PixelPerfect - How to use Formula in Formatting Rules

Last Update:

Aug 19, 2021 10:57:42 PM

Updated By:

Dadiop

Created date:

Aug 19, 2021 10:57:42 PM

Hello,

First of all sorry if this subject has already been report before or not, but from my research I haven't found anyone talking about this.

There is a solution to use Formula inside Formatting rules, like this it's possible the extend the range of possibility to use variable from QS for example.

As you may know, there is no option to add formula here:

Mandom_0-1629427751062.png

BUT it's still possible to use formula and that's what I want to share with you. It can be useful for other NPrinting designers.

Here is an example:

1) Below I created a simple formula (the result is obviously 'good')

Mandom_1-1629427751969.png

2) I created 2 labels and set them by default not visible

Mandom_2-1629427752529.png

3) I created 2 formatting rules to check if the formula has the value 'good' or 'wrong'. To use your formulas inside the condition just put them between brackets [], as done with table columns.

Mandom_3-1629427752682.png

The formatting rule "FormulaWorking" is assign to the green textbox, the other formatting to the red (for the red the condition is replaced by 'wrong').

After launching a preview here is the result that you should get:

Mandom_4-1629427752636.png

Nothing !!! and that's the expected result for anyone who think that it's not possible to use formula in formatting rules.

and here is the solution to make it works:

Mandom_5-1629427752730.png

And now after launching a preview again:

Mandom_6-1629427752214.png

Here is the true expected result, as we set the condition '0=0' which is always true. If I replace by '0=1':

Mandom_7-1629427752584.png

We get the result when the condition is false.

This was just a little condition, but it's possible to put variable for example and therefore use condition related to QS result.

It can be useful to use the formula in a label as a title of charts for example, but if designers don't need to display the formula textbox they just have to put it in another detail band set to not visible for example:

Mandom_8-1629427752537.png

The most important is that the formula must be present inside the page (in a different band or not, hidden or not)

The version used is NPrinting February 2021 SR1 (Version: 21.0.2.0). Maybe the feature of using formula in Formatting rules has been implemented already in more recent version. Sorry again if this has already been reported and explained in another post.

Best regards

Comments
Ruggero_Piccoli
Support
Support

Useful, thanks for sharing!

Frank_S
Support
Support

Thank you @Dadiop 

Nice share!

Contributors
Version history
Last update:
‎2021-08-19 10:57 PM
Updated by: