Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
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
Sorry, but do you mean the caption (which all the objects may have)
or the column headers?
Hi,
I talk about the caption.
Regards,
Jaymerry
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
Great, it works
Thaks for your help Staffan,
Best regards,
Jaymerry