Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Gartner® Magic Quadrant™: 15 YEARS A LEADER - GET THE REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
kenr169387
Contributor III
Contributor III

Dynamic size for Shap based on word wrapping label

I have a report band I am trying to make visually distinct from the detail band.  In Crystal Reports I was able to place a box around the group (band in pixel perfect lingo) and tie the size of the box to the size of the group.  As the group expanded due to word wrapping the box would expand too.  How do I accomplish this in pixel perfect?  Or is there a better method for accomplishing the same goal? 

Labels (2)
1 Solution

Accepted Solutions
kenr169387
Contributor III
Contributor III
Author

Found it!  Set the shape and the data cells as @Ruggero_Piccoli noted. Then go to the shape's settings - Behavior - Anchor Vertically: set to "both".  

Snip of Properties PanelSnip of Properties Panel

 

In my case the shape filled the entire band.  I'm not sure what will happen when the shape fills only part of the band. 

Thanks, 

Ken

View solution in original post

4 Replies
kenr169387
Contributor III
Contributor III
Author

Well, I've found a work around that's finicky and time consuming so please don't think this is the answer.  Using the column where word wrapping is possible, create a duplicate of the field and color the background color as desired.  Then color the font (foreground color) to match the background - hiding the font. This creates a solid block of color that will grow with the word wrapping. Then create a series of this field and place them end to end horizontally so it creates a solid bar across the band.  Then place these fields behind the other columns in the band.  The secret here is to keep the field properties exactly the same as the original word wrapping column (except font color).  If the original word wrapping column has any layout changes then you have to update all the other color block columns. Using Styles helps some but it doesn't control height and width. Repeat this process for each word wrapping column in the band.

It is not fun nor efficient but does seem to work. 

Please tell me there's a better method...  this is essentially HTML formatting, correct? Can I not edit the background color of the band somewhere?  Selecting the band properties and background color just colors the background of all the fields in the band, not the color of the band itself.

Ruggero_Piccoli
Support
Support

Hi,

Your template structure is not clear but you could try:

1 select the detail band and set the background color. All objects you will add in the band will have that background color. In the remaining space you can drag and drop a shape object.

Ruggero_Piccoli_0-1747663654826.png

Ruggero_Piccoli_1-1747664301616.png

2 drag and drop a shape in the details band and set the background color. Drag and drop data cells over the shape

Ruggero_Piccoli_2-1747664465916.pngRuggero_Piccoli_3-1747664487784.png

It will be useful to have a screenshot ot the template structure. 

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.
kenr169387
Contributor III
Contributor III
Author

Hello!  Thanks for the reply.  Adding a shape object to the background was my first thought.  But I have 3 columns in the band that experience word wrapping which changes the height of the band.  Unfortunately, the shape object does not dynamically grow when word wrapping changes the height of the band - or at least I haven't figured out how to do this yet.

Here's the template structure (Currently using the work around noted in post above)

kenr169387_0-1747665839348.png

 

kenr169387
Contributor III
Contributor III
Author

Found it!  Set the shape and the data cells as @Ruggero_Piccoli noted. Then go to the shape's settings - Behavior - Anchor Vertically: set to "both".  

Snip of Properties PanelSnip of Properties Panel

 

In my case the shape filled the entire band.  I'm not sure what will happen when the shape fills only part of the band. 

Thanks, 

Ken