Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Employee
Employee

Hide Totals Row through VBS?

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

1 Solution

Accepted Solutions

Hide Totals Row through VBS?

Hi,

    Try below code.

     Sub Check

   

     set chart = ActiveDocument.ActiveSheet.CreateStraightTable

     chart.AddDimension "Year1"

     chart.AddExpression "1"

     set cp = chart.GetProperties

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

     expr.UsePartialSum = false  //To disable the total sum.

     chart.SetProperties cp

     End Sub

Regards,

Kaushik Solanki

8 Replies
Employee
Employee

Hide Totals Row through VBS?

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.

Employee
Employee

Hide Totals Row through VBS?

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

jsn
Honored Contributor

Hide Totals Row through VBS?

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

Employee
Employee

Re: Hide Totals Row through VBS?

Yes, I was looking at this.  Unfortunately, it doesn't have an option to show 'no totals'.

Hide Totals Row through VBS?

Hi,

    Try below code.

     Sub Check

   

     set chart = ActiveDocument.ActiveSheet.CreateStraightTable

     chart.AddDimension "Year1"

     chart.AddExpression "1"

     set cp = chart.GetProperties

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

     expr.UsePartialSum = false  //To disable the total sum.

     chart.SetProperties cp

     End Sub

Regards,

Kaushik Solanki

Employee
Employee

Hide Totals Row through VBS?

Thank you!

rynedh_blueb
New Contributor

Re: Hide Totals Row through VBS?

The values for AggregationMode may have changed, in my system "Average" has a value of 3.

rynedh_blueb
New Contributor

Re: Hide Totals Row through VBS?

Community Browser