3 Replies Latest reply: May 11, 2016 4:02 AM by Marcus Sommer RSS

    Declare Size of Image

    Susovan Ghosh

      I want to set height and width of image which fetch from database.

      Is this possible in Qlikview Script?

        • Re: Declare Size of Image
          Marcus Sommer

          You will need macros for this. Here an example from the APIGuide.qvw (is in your install-folder by automation) how you could set such properties:

           

          rem double size of all sizable objects on active sheet

          set sh = ActiveDocument.ActiveSheet

          dim dummy(0)  'dummy array indicates all parts of frame to be set

          for i = 0 to sh.NoOfSheetObjects-1

              set obj = sh.SheetObjects(i)

              set fr = obj.GetFrameDef

              set pos = fr.Rect

              pos.Width = pos.Width * 2

              pos.Height = pos.height * 2

              obj.SetFrame fr,true,dummy

          next

           

          - Marcus

            • Re: Declare Size of Image
              Susovan Ghosh

              Macro does not work in web portal.

                • Re: Declare Size of Image
                  Marcus Sommer

                  That's right but there aren't other inbuilt features with them you could adjust these properties.

                   

                  If you have only a few varieties you could create an single object for each and control then the visibility of them. But with many varities it's not very practicable. The only way then would be to use an extension for it. I think if you searched for extensions you will find any examples which have implemented a way to control the heights and widths and which you could then adapt for your solution.

                   

                  - Marcus