OWC10 - how to show pivot detail rows and grand total without showing subtotal

K

KJL

I am using VB6 and OWC10. What I want to do it to show detail rows and
Grand total and hide the subtotal. Can anyone help? Thanks!
 
C

Chris Magoun

Each field has a boolean SubTotals(index) property that determines whether
or not a subtotal is calculated for that field or not.

For instance, let's say you had a fieldset called Time that had two fields,
Year and Quarter. You are looking at data from 2001, and 2002, and do not
want to se subtotals for each year.

You could use:

Dim av as PivotView
Set av = m_pivot.ActiveView

av.FieldSets("Time").Fields("Year").SubTotals(0) = False
av.FieldSets("Time").Fields("Quarter").SubTotals(0) = True

Chris Magoun
 
K

KJL

Thanks Chris.



But it is not what I want. Maybe I didn't discribe it clearly. For
example, I have one field in row axis say Sale_Rep and one field in data
axis say Sales (total field). Sale_Rep A has sales of 1000,2000 and the
tatal is 3000. Sale_Rep B has sales of 4000,5000 and the tatal is 9000.



The report I want is

Sale_Rep Sales

A 1000

2000

B 4000

5000

Total 12000



The report I got either

Sale_Rep Sales

A 1000

2000

------

3000 <-- want to hide this row

B 4000

5000

------

9000 <-- want to hide this row

Total 12000





Or

Sale_Rep Sales

A 1000

2000

B 4000

5000

(Total 12000 <-- missing)



Do you know any trick to get the report I want? I tried to modify the
row height, but couldn't get it work.







Originally posted by Chris Magoun
Each field has a boolean SubTotals(index) property that
determines whether
or not a subtotal is calculated for that field or not.

For instance, let's say you had a fieldset called Time that had
two fields,
Year and Quarter. You are looking at data from 2001, and 2002,
and do not
want to se subtotals for each year.

You could use:

Dim av as PivotView
Set av = m_pivot.ActiveView

av.FieldSets("Time").Fields("Year").SubTotals(0) = False
av.FieldSets("Time").Fields("Quarter").SubTotals(0) = True
Chris Magoun
news:[email protected]"]bforums.com[/url]...
I am using VB6 and OWC10. What I want to do it to show detail rows and
Grand total and hide the subtotal. Can anyone help? Thanks!
--
Posted via
http://dbforums.com/http://dbforums.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top