Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > .NET

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 10-30-2009, 01:33 PM
csillagyitzik's Avatar
csillagyitzik csillagyitzik is offline
Registered User
 
Join Date: Feb 2007
Posts: 9
Pivot Table - change the value fields orientation

When I'm creating a Pivot Table and setting the fields orientation and have 2 fields in the data area (look in code snippet below), the output is something like that:

Field 0
"aaa" Sum of Field 1: 500
Sum of field 2: 50
"bbb" Sum of Field 1: 600
Sum of field 2: 55
"ccc" Sum of Field 1: 450
Sum of field 2: 45

I want to be able to change it to this format:
Field 0 Sum of Field 1 Sum of Field 2
"aaa" 500 50
"bbb" 600 55
"ccc" 450 45

how can I do it in vb .net code?

Code:
ptTable.PivotFields("Field0").orientation = Excel.XlPivotFieldOrientation.xlRow
ptTable.PivotFields("Field1").orientation = Excel.XlPivotFieldOrientation.xlDataField
ptTable.PivotFields("Field2").orientation = Excel.XlPivotFieldOrientation.xlDataField
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
query tuning dhaya Database 11 08-25-2003 06:24 PM
Adding Data to a Database Field in VB6 Brian Higgins VB Classic 1 11-27-2001 12:19 AM
Pivot Table HELP!!! olaf ASP.NET 0 12-05-2000 02:52 PM
Creating a pivot table Burak VB Classic 0 06-27-2000 02:31 PM
VB Pivot table Dwg VB Classic 0 05-25-2000 07:51 AM


All times are GMT -4. The time now is 11:56 PM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.