Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

qlikview capturing format settings of a document

Hi All,

Is it possible to capture the format settings (font, color,size etc) of a qlikview report?

Thanks and Regards,

Anju

11 Replies
Alexander_Thor
Employee
Employee

Hi Anju,

Yes every object in QlikView has their styling exposed in the JavaScript API through the Qv.Document.Object.Style class.

There is no way to grab the default document settings at the moment through the JavaScript API.

Not applicable
Author

Hi Alexander,

Thank you for replyiing!

But is it possible to copy paste objects via javascript API?

Alexander_Thor
Employee
Employee

There is no official method in the api to do it. You could however use the object you want to copy as a base for a new object. You would have to re-wire some inheritance but should be doable in theory. Don't have any code to back it up though.

Not applicable
Author

Hi Alexander,

Do you have any documentation of the api?

Alexander_Thor
Employee
Employee

Sure, you can find it on http://community.qlik.com/docs/DOC-2673

Not applicable
Author

Thank You!!

Not applicable
Author

Hi Alexander,

I tried this macro.

But, there is some error in it..

sub font

qv.document().getobject("LB0").style.bordercolor=rgb(77,89,600)

end sub

could you pls help me with the syntax?

-Anju

Alexander_Thor
Employee
Employee

Ah, you can't leverage the JS API inside of a macro. If you want to use macros you should look into the Automation API that you can find here: http://community.qlik.com/docs/DOC-2640

Also here is a snippet that might help you

set mybox = ActiveDocument.GetSheetObject("LB01")

mbp = mybox.GetProperties

mbp.Layout.Frame.BorderEffect = 3

mbp.Layout.Frame.Color.PrimaryCol.Col = RGB(255,0,0)

mbp.Layout.Frame.BorderWidth = 5

mbp.Layout.Frame.Dark = 0.25

mbp.Layout.Frame.Light = 0.9

mybox.SetProperties mbp

Not applicable
Author

Hi Alexander,

If I were to create an extension,is it possible to list out the different types of objects possible and its features so that the user can give inputs?

Is it possible to write some code like this

     for(i=0;i<=objectlist.size();i++)

     {

      for(j=0;j<=i.attributes;i++)

     {

          give a dropdown list for each attribute//so that user can give inputs for each attribute and it will automatically be applied to all objects of that type?

     }

}

Thanks,

Anju