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: 
Lauri
Specialist
Specialist

Hide and collapse controls based on condition

I'm working in PixelPerfect to run a report that produces 1 page per patient. Here's part of the layout:

Lauri_0-1642026041825.png

I created a condition to hide some controls (the 10 from PAP to [Latest Bone Density]) when the patient is not Female, and it works. But their space remains empty. Is it possible to make the other controls move up and take up the empty space?

Thanks very much for your help.

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Lauri 

I meant that section in red frame on the screenshot should be kept in form of the table:

Lech_Miszkiewicz_0-1642369937509.png

that way if something drops out you simply will have 1 less row and pixel perfect table naturally will handle it.

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

10 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, 

I would try to do this in form of the table coming from Qlik Sense rather than single placeholders so values like PAP, HVP, Mammogram etc... would populate dynamically depending on the filter/condition you would set.

The other alternative is to hide/show whole band - but I think it would be cumbersome in this case. 

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.
Lauri
Specialist
Specialist
Author

I see the new article you wrote, @Frank_S ; thanks very much! It is not clear to me if it addresses my need: I want certain controls to disappear completely (or make their  Visible=No and Height=0) when a condition is met. That way the controls below them will move up on the page. So if patient Gender='Female' then "PAP" label and [Latest Pap] disappear and the remaining controls move up right under the horizontal line.

Frank_S
Support
Support

Hi  @Lauri
I realized that my response would not help after the fact so I deleted it. Looks like Lech's idea might be the way to go.

However, one last crack at this the is possible usage of conditional formatting rules which allow you to show hide in a manner that might be helpful to you.

 

Check out this link at your convenience...

 

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Lauri
Specialist
Specialist
Author

@Lech_Miszkiewicz Thanks for the suggestion to do this in a Sense table. Do you mean that I should have a Sense table that contains all of the text that I want to display in PixelPerfect, including labels, and then set up a table in PixelPerfect instead of separate controls like I did?

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Lauri 

I meant that section in red frame on the screenshot should be kept in form of the table:

Lech_Miszkiewicz_0-1642369937509.png

that way if something drops out you simply will have 1 less row and pixel perfect table naturally will handle it.

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.
Ruggero_Piccoli
Support
Support

Hi,

That is correct. I mean the condition hide a field and its space remains blank and it is not removed. To remove the white space you have to insert the fields that need to be hidden in a specific detail band and apply the condition to the band. When the condition hides the band the space will be removed.

For example, you could try to add a sublevel by gender, move the fields that are common for all persons in the header band, add a detail band common for everybody and another nested detail band by gender where you apply the condition. Or something similar.

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.
Lauri
Specialist
Specialist
Author

Hi @Ruggero_Piccoli , your suggestion sounds good, but I am not sure how to nest the levels and bands.

  1. I currently have one level called "Planner" based on a Sense table with many fields, including Gender. Should I add a level beneath that based on Gender?
  2. Should I add a Detailed Report (bound to the new Gender level) beneath the existing Detailed Report (bound to the Planner level)?
Ruggero_Piccoli
Support
Support

Hi,

To nest levels in PixlePlerfect you have to nest the fields/tables in the hierarchical order in the Levels node as in the picture. This is different then in Excel templates. 

010.png

Then you create the related details bands in the template and apply the formatting rule only to the inner band that you want to conditionally hide. 

Based on what I understood of your scenario you have to create the higher level band with all common data that are always visible and the most detailed bad with only the data that will be visible based on the gender. As in the picture you can mix a table and a field in the same level hierarchy. 

I hope it helps.

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.
Lauri
Specialist
Specialist
Author

Thank you, Ruggero, I understand the concept, but I cannot make it work. And I have many other questions about how to use PixelPerfect. Do you offer any training classes on PixelPerfect? 

I have watched the YouTube help videos for NPrinting, but I really need a live teacher...