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: 
nandraja
Contributor
Contributor

If Condition calculation in Group Footer for NPrinting 16

Hi All,

 

I am developing pixcel perfect report in Nprinting 16 version, in that i want to write if condition on basis of count of Portfolio Name is greater than 1 then it should print 'Students' and if count =1 then print 'Sudent'.  

 

Subject                      Student Name

Physics                                   A

Physics                                   B

Physics                                   C

Physics                                   D

Chemisty                               F

Chemisty                               E

Chemisty                               G

Chemisty                               H

Chemisty                                I

Chemisty                               J

 

Output of the Nprinting Report:- 

Subject                       Student Name

Physics                                   A

                                         1 Student

Chemisty                               B

Chemisty                               C

Chemisty                               D

Chemisty                               E

Chemisty                                F

Chemisty                               G

                                         6 Students

Labels (2)
11 Replies
Ruggero_Piccoli
Support
Support

Hi,

Check the following article https://community.qlik.com/t5/Qlik-NPrinting-Documents/How-to-Add-Totals-and-Subtotals-to-PixelPerfe...

I think you can do something similar and you need only to change the summary function from **bleep**() to count().

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
nandraja
Contributor
Contributor
Author

HI,

You didn't get my issue clearly. 

If the count of students is 1 then i want "1 student" and if count of students is more than 1  i.e. 6, then i want to print "6 students". 

Ruggero_Piccoli
Support
Support

Hi,

I wrote this tutorial to answer to your question https://community.qlik.com/t5/Qlik-NPrinting-Documents/Conditionally-display-a-label-based-on-the-nu...

The PixelPerfect template editor is the same in QlikView NPrinting 16 and in the Qlik NPrinting 17+.

Best Regards,

Ruggero

 



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
nandraja
Contributor
Contributor
Author

Hi,

I need to use pixel perfect for grouping. The suffix part of format string is not working for xslx format. Please suggest any soulution.

 

Thanks in advance!

Ruggero_Piccoli
Support
Support

Hi,

Instead of writing the suffix as format string of the cell where you display the count(), create two new Label cells, one for each case. Then apply the correct formatting rule to the new labels.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
nandraja
Contributor
Contributor
Author

Hi,

Output of one field should be equal to = count(field) "string". Then we can use two labels.

Ex - 1 Student (output of first  label )

        6 Students(output of second label)

Ruggero_Piccoli
Support
Support

Hi,

Yes, you need to add two labels:

A - Student

B - Students

Than you set Visible = No to both (as explained it the tutorial) and you apply to the A label the formatting rule that makes that label visible when count()=1 and vice-versa for the B label. Than you overlap and align the two labels as described in the tutorial for the count() labels.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
nandraja
Contributor
Contributor
Author

Hi,

But according to tutorial, both label should have a suffix in the format string(ex.- 'Salesman'). But the issue is suffix is not showing when i generate a report in excel format. But it is showing in .pdf. 

 

Is there any way to solve this issue?

 

Thanks.

Rajeev

Ruggero_Piccoli
Support
Support

Hi,

You need to create two NEW labels one for each case with only the strings inside. Then apply the formatting rules to that labels. I tested on my installation and it works on both Excel and PDF.

At the end you will have 4 labels: two for single (one with the count and one with the string) and two for plural (one with the count and one with the string). 

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.