0 Replies Latest reply: Apr 10, 2013 8:55 AM by Micael Leal RSS

    Click sheet object value in QlikView with C#

      Hello,

       

      I would like to simulate a click inside a table with C#.

       

      Reason why? I want to generated an automatically generated report in Excel/PowerPoint, but the generated code will be created in C# and it will basically do following:

       

      Product ¦ Price ¦ Appear

           x        2          24/02

           x        3          25/02

           y        4          23/02

           y        6          26/02

       

      And how can I create that click event on "x" , then "2" and "24/02", then "x" and "3" and "25/02" and so on.

       

      Product ¦ Price ¦ Appear

           x        2          24/02

           x        3          25/02

       

      Product ¦ Price ¦ Appear

           x        2          24/02

           x        2          25/02

       

      Because it might happen that for the same product and the same price, we might have 2 different date that appeared because there are for example 2 different companies that send us the same product for the same price but on different days.

       

      While clicking in those fields, I generate in QlikView a new chart, which I export into Excel/PowerPoint via C# ( which already works, but not on specific click, but on whole table/chart content ).

       

      I want to avoid doing it in the Module Editor in QlikView, because programming it with C#, will do the same task for any future QlikView document and won't need to insert everytime again the VBS code in the Editor.

       

      Code for VBA would be:

       

              Set ProductValues = ActiveDocument.Fields("Product").GetPossibleValues

              For i = 0 To ProductValues.Count - 1

                 clearAll   

                 Call selectField("Product", ProductValues.Item(i).Text)

                 Set PriceValues = ActiveDocument.Fields("Price").GetPossibleValues

                 For j = 0 To PriceValues.Count - 1

                         clearAll

                         Call selectField("Product", ProductValues.Item(i).Text)

                         Call selectField("Price", PriceValues.Item(j).Text)

                         Set AppearValues = ActiveDocument.Fields("Appear").GetPossibleValues

                         For k = 0 To AppearValues.Count - 1

       

      I want to avoid typing always the same code again and again and modify it depending the column content of my table, but that it does the event by itself and for each changed click which generates a new chart, I import it and continue to the next row and import that new chart.

       

      I hope, someone might have an idea how to solve it.

       

      Thanks.

       

      Mike