Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
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')
2) I created 2 labels and set them by default not visible
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.
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:
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:
And now after launching a preview again:
Here is the true expected result, as we set the condition '0=0' which is always true. If I replace by '0=1':
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:
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
Useful, thanks for sharing!
Thank you @Dadiop
Nice share!