6 Replies Latest reply: Jan 13, 2012 1:25 PM by Mike Reese RSS

    Hide Totals Row through VBS?

    Mike Reese

      I am creating a straight table dynamically through the vb script, but can't seem to get rid of the totals row.  Any thoughts?

       

      Thanks

        • Hide Totals Row through VBS?
          Mike Reese

          Basically, I need the ability to set the totals mode to no totals on each expression, but I don't see an expression  property for that.

          • Hide Totals Row through VBS?
            Mike Reese

            Just checking to see if anyone had any thoughts on this?

              • Hide Totals Row through VBS?
                Johannes Sunden

                As far as I can tell you can't control that. You can switch between Expression total and the type of total that you want. BrutalSum decides between Expression Total and the type of total you want, while AggregationMode decides the type of Total:

                 

                set chart = ActiveDocument.Sheets("Main").CreateStraightTable

                chart.AddDimension "ProductType"

                chart.AddExpression "sum(Amount)"

                chart.AddExpression "count(Customer)"

                set p = chart.GetProperties

                p.Expressions.Item(1).Item(0).Data.ExpressionData.BrutalSum = true

                p.Expressions.Item(1).Item(0).Data.ExpressionData.AggregationMode = 5   'sum

                chart.SetProperties p

                 

                Specific aggregation function to be used for totals when BrutalSum=true

                0   =   Numeric count

                1   =   Null count

                2   =   Text Count

                3   =   Total count

                4   =   Missing count

                5   =   Sum

                6   =   Average

                7   =   Std dev

                8   =   Skewness

                9   =   Kurtosis

                10  =   Min

                11  =   Max

                12  =   Only value

                13  =   Mode value

                14  =   First string

                15  =   Last string

              • Hide Totals Row through VBS?
                Mike Reese

                Thank you!