Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jaymerry
Creator
Creator

Multiline caption with a macro

Hello all,

I'm trying to add lines to a Pivot table caption with a macro, but I don't find it into the APIguide.qvw

Do you think that is possible with Qlikview 9 SR6 ?

Thank you for your help,

Best regards,

Jaymerry

1 Solution

Accepted Solutions
Not applicable

To change the number of lines in the caption height for a chart you can use the following macro. The only difference from Eric's suggestion is that it uses the property GraphLayout instead of Layout.

sub wrapCaption

set CH = ActiveDocument.GetSheetObject("CH12")
set chartprop=CH.GetProperties
chartprop.GraphLayout.Frame.MultiLine = 3
CH.SetProperties chartprop

end sub

View solution in original post

6 Replies
erichshiino
Partner - Master
Partner - Master

on the api guide, try the class IFrame and member multiline.

It provides this example:

set LB = ActiveDocument.GetSheetObject("LB01")
set boxprop=LB.GetProperties
boxprop.Layout.Frame.MultiLine = 3 '3 lines
boxprop.Layout.Frame.TextAdjustHorizontal = 1 'center
boxprop.Layout.Frame.TextAdjustVertical = 4 'center
LB.SetProperties boxprop

Hope it helps

jaymerry
Creator
Creator
Author

Hello Eric,

Thanks for your answer.

Unfortunately, I have ever try this example, and it doesn't seem to work with a pivot table.

Any other ideas (Maybe it's not possible with this kind of object) ?

Thanks for your help,

Best regards,

Jaymerry

erichshiino
Partner - Master
Partner - Master

Sorry, but do you mean the caption (which all the objects may have)

or the column headers?

jaymerry
Creator
Creator
Author

Hi,

I talk about the caption.

Regards,

Jaymerry

Not applicable

To change the number of lines in the caption height for a chart you can use the following macro. The only difference from Eric's suggestion is that it uses the property GraphLayout instead of Layout.

sub wrapCaption

set CH = ActiveDocument.GetSheetObject("CH12")
set chartprop=CH.GetProperties
chartprop.GraphLayout.Frame.MultiLine = 3
CH.SetProperties chartprop

end sub

jaymerry
Creator
Creator
Author

Great, it works Smile

Thaks for your help Staffan,

Best regards,

Jaymerry