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: 
szeconku
Contributor II
Contributor II

Formatting rules not working on Table

Hi

I would like to color the background of a label based on the following two rules (which apparently cannot be stated in one sentence in NPrinting):

  • if value in the label < 0 => background color green (I)
  • if value in the label > 0 => background color red (II)

I can achieve this for labels that are defined in a detail report if I use levels as the data input type. It works perfectly.

When I apply the same logic/rules to labels where the underlying data input type is a table it does not work.

In this conditional formatting task I noticed that you can make a reference to the data in three different ways:

  1. In the Condition where I write my conditions (I) and (II)
  2. Inside the Formatting Rules editor you can assign a Data Member
  3. And on the actual label there is an option to add Data Binding

I have applied all three in the label where the underlying data input type is a level column and it is working. 1. is strictly needed to apply the formatting. I am not sure if I can exclude 2. or 3 to still achieve conditions (I) and (II).

For the label where the underlying data input type is a table column 2. is not an option. 2. can only be applied to Levels.

This leads me to my question:

  • Is it possible to apply formatting rules to anything other that Levels? I wish to apply conditions (I) and (II) to a total column.

Extra question:

  •  Do I need to use a particular function in Qlik Sense for the condtions (I) and (II) to work?

As an alternative I have tried to write a script and apply it to the label. I immediately got stuck when I tried to reference the value of the label.

I am using:

  • Qlik Sense as data source
  • NPrinting Designer 19.19.4.0.

Please let me know if the above description needs screenshots or any additional information.

Labels (1)
2 Solutions

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

that makes sense.

So the TOTAL is not a column and it is a row. In this case i would have in QlikView a table with a Dimension representing TOTAL and use this table in The level.

Overall you need to change design of your report to base everything on the LEVEL tags.

That's all what i can suggest (well to be frank that is how i build my reports always)

regards

Lech

 

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

szeconku
Contributor II
Contributor II
Author

Since the beginning of creating this custom table I have tried to import the two Total tables as levels. 

For some reason I have not been able to do so. And now I can.

Problem solved.

Also realised now that you cannot using Formatting Rules on anything other than Levels.

View solution in original post

5 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

please give us little bit more details. As I am quite accross NPrinitng I assume follwoing:

  • you are talking about NPrinitng Pixel Perfect template
  • when talking about table "....When I apply the same logic/rules to labels where the underlying data input type is a table it does not work...."  I guess you mean table tag (on the left side of NPrinitng designer
    • If that is the case i do not see reason why you need to have conditional formatting rules there as this object is used to create charts or spark-lines only. So conditional formatting of "label" would have no use!
    • 1.PNG
  • if you are talking about tables from right hand side of the NPrinting Designer (PixelPerfect template) then those should be only created by using levels and as you mentioned conditional formatting works there just fine.
    • Capture.PNG

Now, In your description you want to conditionally colour label - do you actually mean "a label" object from the right hand side of NPrinting Designer (PixelPerfect template)?

1.PNG

I am sure you are very close to achieve what you need, but it seems like you are probably using wrong objects in wrong places. Screenshots of your template would help greatly with some comments where you want to apply colours and based on conditions coming from xyz source.

Down to answers:

Is it possible to apply formatting rules to anything other that Levels? I wish to apply conditions (I) and (II) to a total column.

- screenshot would help. "Total column" is just another column so conditional formatting there will work just as on another columns in your level, so my answer is -yes it can be applied.a

Do I need to use a particular function in Qlik Sense for the condtions (I) and (II) to work

No, you dont - if you just comparing value to static value.

Happy to chat further if needed. If it is possible maybe put together sample QVF (ctrl+0+0 script and few UI objects) file and create sample report in nPrinting based on it, export it and attach here and we can work on actual sample so it will be easier to understand and discuss solutions.

 

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.
szeconku
Contributor II
Contributor II
Author

Hi Lech_Miszkiewicz

Thank you for the reply.

Your two assumptions are correct:

  • I am using a Pixel Perfect template
  • When I say 'underlying data input type is a table' I mean a Table tag

The table I am building in the Pixel Perfect template (PPt) looks like it is made from one table. However, I am using three different tables from QV. A grand total (first row in the PPt and one table in QV), a department total (second row in the PPT and another table in QV) and underlying sub-departments (third row and down in the PPt and a third table in QV).

Also, I am not using a Table object (as you indicate in your screenshot). Instead I am using Label objects (as you also indicate in your other screenshot) to create the table. All 'columns' are unique and I have decided to split them up and use labels instead of using the Table object.

I have setup a task in NPrinting that generates PDF's based on user filters. All users should receive the grand total, then the unique department total and the unique underlying sub-departments.  

The grand total should be fixed for all users. That's why I am not using levels. It is not possible for me to retrieve this table from QV as a level. 

Unfortunately, I cannot share any sample QVF.

Hope this explanation helps in understanding the issue I am having.

 

 

szeconku
Contributor II
Contributor II
Author

Correction: I am using QlikView as data source. Not Qlik Sense.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

that makes sense.

So the TOTAL is not a column and it is a row. In this case i would have in QlikView a table with a Dimension representing TOTAL and use this table in The level.

Overall you need to change design of your report to base everything on the LEVEL tags.

That's all what i can suggest (well to be frank that is how i build my reports always)

regards

Lech

 

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.
szeconku
Contributor II
Contributor II
Author

Since the beginning of creating this custom table I have tried to import the two Total tables as levels. 

For some reason I have not been able to do so. And now I can.

Problem solved.

Also realised now that you cannot using Formatting Rules on anything other than Levels.