Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set wrap cell text property of a straight table with variable

Hi,

Please let me know if there is a way to set the row height of an expression with a variable.

Kindest Regards

Werner

1 Solution

Accepted Solutions
Not applicable
Author

Werner,

example is attached. Please note that you can't change line height for specific expression only -- it can be changed for all table only.

VB macro is as follows:

sub SetExpressionRowHeight

          set chart = ActiveDocument.GetSheetObject("CH01")

          set cp = chart.GetProperties

          set var = ActiveDocument.GetVariable("vHeight")

          cp.TableProperties.Multiline = var.GetContent.String

          chart.SetProperties cp

end sub

Macro is called when variable vHeight changes. This is defined in Document Properties -> Triggers

View solution in original post

4 Replies
Not applicable
Author

I would try doing following:

1. Write a VB macro that changes the wrap cell property of target object (straight table) depending on value of the variable

2. Go to Document Properties -> Triggers and set action OnChange for the variable to run that VB macro

Not applicable
Author

Can you please assist me with an example that will do just that?

Kindest Regards

Werner

Not applicable
Author

Werner,

example is attached. Please note that you can't change line height for specific expression only -- it can be changed for all table only.

VB macro is as follows:

sub SetExpressionRowHeight

          set chart = ActiveDocument.GetSheetObject("CH01")

          set cp = chart.GetProperties

          set var = ActiveDocument.GetVariable("vHeight")

          cp.TableProperties.Multiline = var.GetContent.String

          chart.SetProperties cp

end sub

Macro is called when variable vHeight changes. This is defined in Document Properties -> Triggers

Not applicable
Author

Werner, does this solution work for you? If yes, please mark it as answered question. Thx.