1 Reply Latest reply: Apr 16, 2014 2:37 AM by Amit Saini RSS

    Macro that shows Dimension of a chart

    Fabian Heidenstecker

      Hello QlikView Community,

       

      I am trying to develop a macro that shows some property of a chart.

      It works great for expressions, but i can't get it to work to display what is the dimension.

      I used the API Guide QVW to find out most of the properties, but i can't find anything that shows the Dimension.

       

      Can someone help me please? I attached my example file.

      Here is the Macro I use:

      sub chartinfo()

          'Display Object Name

          set obj = ActiveDocument.GetSheetObject("CH01")

          msgbox(obj.GetCaption.Name.v)

       

          'Count number of Expressions

          set chart = ActiveDocument.GetSheetObject("CH01")

          set cp = chart.GetProperties

          x = cp.Expressions.Item(0).Count

          msgbox x

        

          'Expression and Expression Label

          set chart = ActiveDocument.GetSheetObject("CH01")

          set p = chart.GetProperties

          set expr = p.Expressions.Item(0).Item(0).Data.ExpressionData

          msgbox expr.Definition.v '= "sum(Amount)"

          set expr = p.Expressions.Item(0).Item(0).Data.ExpressionVisual

          msgbox expr.Label.v '= "Sales"

       

        

          'Dimesions

          set dims = p.Dimensions

          msgbox dims(0).Title.v

          msgbox dims(0).Comment.v

          'how can i get the actual dimension field?

       

      end sub

       

      Regards from Germany,

      Fabian

       

      I attached my qvw Nachricht geändert durch Fabian Heidenstecker