2 Replies Latest reply: Mar 21, 2014 5:12 AM by geo gou RSS

    script module with if condition of a data loading field

    geo gou

      Hello.

       

      I have a script module in a trigger on post reload action that exports an excel file from a chart.

      The script is :

      Sub ExportFiles

       

      pathcorp="c:\sales\"

      set corp = ActiveDocument.GetSheetObject("CH01")

      corp.ExportBiff pathcorp & "Sales.xls"


      End Sub


      The dimension of the chart is the field "store" and the expression is

      sum ( { <date_id = { '$(=vdate)' } > } sales )


      The date_id and sales are fields and vdate is a variable that returns the current date.


      My issue is how can i export from a script module the data for all the stores i have .

      What changes have to do in the script and the expression of the chart.


      Thank you in advance