OWC Fieldlist showing Hours, Minutes, and Seconds

T

Taylor H. Maxwell

I am trying to build an Office OWC 11 Web components pivot table solution.
Unfortunately, I have not been able to get date fields to show as desired
(ie, not showing the time information for Hours, Minutes, and Seconds).

Here is the code I am working with against the Northwind SQL Server 2000
database:

Dim ConnectionString As String = "Provider=SQLOLEDB.1;Persist
Security Info=True;User ID=appapollo;Password=dna;" & _
"Initial Catalog=Northwind;Data Source=localhost"

NorthwindPivot.ConnectionString = ConnectionString
NorthwindPivot.CommandText = "Select * From Invoices"

Dim NorthwindView As PivotView
NorthwindView = NorthwindPivot.ActiveView


NorthwindView.RowAxis.InsertFieldSet(NorthwindView.FieldSets("ProductName"),
0)

NorthwindView.ColumnAxis.InsertFieldSet(NorthwindView.FieldSets("SalesPerson"), 0)

NorthwindView.FilterAxis.InsertFieldSet(NorthwindView.FieldSets("ShippedDate"), 0)

NorthwindView.DataAxis.InsertFieldSet(NorthwindView.FieldSets("ExtendedPrice"), 0)


Dim fs As Integer
Dim fld As Integer
For fs = 0 To NorthwindPivot.ActiveView.FieldSets.Count - 1
If NorthwindPivot.ActiveView.FieldSets(fs).Type =
PivotFieldSetTypeEnum.plFieldSetTypeOther Then

ElseIf NorthwindPivot.ActiveView.FieldSets(fs).Type =
PivotFieldSetTypeEnum.plFieldSetTypeTime Then

For fld = 0 To
NorthwindPivot.ActiveView.FieldSets(fs).Fields.Count - 1
Select Case
NorthwindPivot.ActiveView.FieldSets(fs).Fields(fld).Type
Case PivotFieldTypeEnum.plTypeTimeHours,
PivotFieldTypeEnum.plTypeTimeMinutes, PivotFieldTypeEnum.plTypeTimeSeconds

NorthwindPivot.ActiveView.FieldSets(fs).Fields(fld).IsIncluded = False
End Select
Next
NorthwindPivot.ActiveView.FieldSets(fs).AllIncludeExclude =
PivotFieldSetAllIncludeExcludeEnum.plAllDefault

End If

Next
 
T

Taylor H. Maxwell

Reposting due to lack of response. Anyone trying to work with dates in Pivot
Tables?
 
A

Alvin Bruney [ASP.NET MVP]

One approach is simply to use the number format property for the specified
dimention. you can eliminate the extra material or present the date exactly
as you want it to display in the user interface piece using an appropriate
format mask that should be passed in to the numberformat property.

--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------
 
T

Taylor H. Maxwell

Thanks for the response Alvin,

The Fieldset object does not have a NumberFormat property. Therefore the
format has to be added to individual fields. Are you thinking of a different
property on the fieldset object?

I have also tried using the IsIncluded property of the field objects to try
to make them invisible but this has no affect as well.

I got a copy of your book. It has a lot of material that I have found very
useful including your client side OWC detection system which I have
incorporated into my current solution.

Alvin Bruney said:
One approach is simply to use the number format property for the specified
dimention. you can eliminate the extra material or present the date exactly
as you want it to display in the user interface piece using an appropriate
format mask that should be passed in to the numberformat property.

--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------

Taylor H. Maxwell said:
Reposting due to lack of response. Anyone trying to work with dates in
Pivot
Tables?
 
A

Alvin Bruney [ASP.NET MVP]

--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------

Taylor H. Maxwell said:
Thanks for the response Alvin,

The Fieldset object does not have a NumberFormat property. Therefore the
format has to be added to individual fields. Are you thinking of a
different
property on the fieldset object?

I have also tried using the IsIncluded property of the field objects to
try
to make them invisible but this has no affect as well.

I got a copy of your book. It has a lot of material that I have found very
useful including your client side OWC detection system which I have
incorporated into my current solution.

Alvin Bruney said:
One approach is simply to use the number format property for the
specified
dimention. you can eliminate the extra material or present the date
exactly
as you want it to display in the user interface piece using an
appropriate
format mask that should be passed in to the numberformat property.

--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------

Taylor H. Maxwell said:
Reposting due to lack of response. Anyone trying to work with dates in
Pivot
Tables?

:

I am trying to build an Office OWC 11 Web components pivot table
solution.
Unfortunately, I have not been able to get date fields to show as
desired
(ie, not showing the time information for Hours, Minutes, and
Seconds).

Here is the code I am working with against the Northwind SQL Server
2000
database:

Dim ConnectionString As String = "Provider=SQLOLEDB.1;Persist
Security Info=True;User ID=appapollo;Password=dna;" & _
"Initial Catalog=Northwind;Data Source=localhost"

NorthwindPivot.ConnectionString = ConnectionString
NorthwindPivot.CommandText = "Select * From Invoices"

Dim NorthwindView As PivotView
NorthwindView = NorthwindPivot.ActiveView


NorthwindView.RowAxis.InsertFieldSet(NorthwindView.FieldSets("ProductName"),
0)

NorthwindView.ColumnAxis.InsertFieldSet(NorthwindView.FieldSets("SalesPerson"),
0)

NorthwindView.FilterAxis.InsertFieldSet(NorthwindView.FieldSets("ShippedDate"),
0)

NorthwindView.DataAxis.InsertFieldSet(NorthwindView.FieldSets("ExtendedPrice"),
0)


Dim fs As Integer
Dim fld As Integer
For fs = 0 To NorthwindPivot.ActiveView.FieldSets.Count - 1
If NorthwindPivot.ActiveView.FieldSets(fs).Type =
PivotFieldSetTypeEnum.plFieldSetTypeOther Then

ElseIf NorthwindPivot.ActiveView.FieldSets(fs).Type =
PivotFieldSetTypeEnum.plFieldSetTypeTime Then

For fld = 0 To
NorthwindPivot.ActiveView.FieldSets(fs).Fields.Count - 1
Select Case
NorthwindPivot.ActiveView.FieldSets(fs).Fields(fld).Type
Case PivotFieldTypeEnum.plTypeTimeHours,
PivotFieldTypeEnum.plTypeTimeMinutes,
PivotFieldTypeEnum.plTypeTimeSeconds

NorthwindPivot.ActiveView.FieldSets(fs).Fields(fld).IsIncluded = False
End Select
Next

NorthwindPivot.ActiveView.FieldSets(fs).AllIncludeExclude
=
PivotFieldSetAllIncludeExcludeEnum.plAllDefault

End If

Next
 
A

Alvin Bruney [ASP.NET MVP]

I have an active support incident with MS (they're taking their jolly time
to get back to me) i'll try to piggy back your request on the ticket for a
resolution but it will take some time (at the speed they are moving)

--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------

Taylor H. Maxwell said:
Thanks for the response Alvin,

The Fieldset object does not have a NumberFormat property. Therefore the
format has to be added to individual fields. Are you thinking of a
different
property on the fieldset object?

I have also tried using the IsIncluded property of the field objects to
try
to make them invisible but this has no affect as well.

I got a copy of your book. It has a lot of material that I have found very
useful including your client side OWC detection system which I have
incorporated into my current solution.

Alvin Bruney said:
One approach is simply to use the number format property for the
specified
dimention. you can eliminate the extra material or present the date
exactly
as you want it to display in the user interface piece using an
appropriate
format mask that should be passed in to the numberformat property.

--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------

Taylor H. Maxwell said:
Reposting due to lack of response. Anyone trying to work with dates in
Pivot
Tables?

:

I am trying to build an Office OWC 11 Web components pivot table
solution.
Unfortunately, I have not been able to get date fields to show as
desired
(ie, not showing the time information for Hours, Minutes, and
Seconds).

Here is the code I am working with against the Northwind SQL Server
2000
database:

Dim ConnectionString As String = "Provider=SQLOLEDB.1;Persist
Security Info=True;User ID=appapollo;Password=dna;" & _
"Initial Catalog=Northwind;Data Source=localhost"

NorthwindPivot.ConnectionString = ConnectionString
NorthwindPivot.CommandText = "Select * From Invoices"

Dim NorthwindView As PivotView
NorthwindView = NorthwindPivot.ActiveView


NorthwindView.RowAxis.InsertFieldSet(NorthwindView.FieldSets("ProductName"),
0)

NorthwindView.ColumnAxis.InsertFieldSet(NorthwindView.FieldSets("SalesPerson"),
0)

NorthwindView.FilterAxis.InsertFieldSet(NorthwindView.FieldSets("ShippedDate"),
0)

NorthwindView.DataAxis.InsertFieldSet(NorthwindView.FieldSets("ExtendedPrice"),
0)


Dim fs As Integer
Dim fld As Integer
For fs = 0 To NorthwindPivot.ActiveView.FieldSets.Count - 1
If NorthwindPivot.ActiveView.FieldSets(fs).Type =
PivotFieldSetTypeEnum.plFieldSetTypeOther Then

ElseIf NorthwindPivot.ActiveView.FieldSets(fs).Type =
PivotFieldSetTypeEnum.plFieldSetTypeTime Then

For fld = 0 To
NorthwindPivot.ActiveView.FieldSets(fs).Fields.Count - 1
Select Case
NorthwindPivot.ActiveView.FieldSets(fs).Fields(fld).Type
Case PivotFieldTypeEnum.plTypeTimeHours,
PivotFieldTypeEnum.plTypeTimeMinutes,
PivotFieldTypeEnum.plTypeTimeSeconds

NorthwindPivot.ActiveView.FieldSets(fs).Fields(fld).IsIncluded = False
End Select
Next

NorthwindPivot.ActiveView.FieldSets(fs).AllIncludeExclude
=
PivotFieldSetAllIncludeExcludeEnum.plAllDefault

End If

Next
 
T

Taylor H. Maxwell

Thanks Alvin,

I appreciate your help on this. :)

Alvin Bruney said:
I have an active support incident with MS (they're taking their jolly time
to get back to me) i'll try to piggy back your request on the ticket for a
resolution but it will take some time (at the speed they are moving)

--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------

Taylor H. Maxwell said:
Thanks for the response Alvin,

The Fieldset object does not have a NumberFormat property. Therefore the
format has to be added to individual fields. Are you thinking of a
different
property on the fieldset object?

I have also tried using the IsIncluded property of the field objects to
try
to make them invisible but this has no affect as well.

I got a copy of your book. It has a lot of material that I have found very
useful including your client side OWC detection system which I have
incorporated into my current solution.

Alvin Bruney said:
One approach is simply to use the number format property for the
specified
dimention. you can eliminate the extra material or present the date
exactly
as you want it to display in the user interface piece using an
appropriate
format mask that should be passed in to the numberformat property.

--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------

message Reposting due to lack of response. Anyone trying to work with dates in
Pivot
Tables?

:

I am trying to build an Office OWC 11 Web components pivot table
solution.
Unfortunately, I have not been able to get date fields to show as
desired
(ie, not showing the time information for Hours, Minutes, and
Seconds).

Here is the code I am working with against the Northwind SQL Server
2000
database:

Dim ConnectionString As String = "Provider=SQLOLEDB.1;Persist
Security Info=True;User ID=appapollo;Password=dna;" & _
"Initial Catalog=Northwind;Data Source=localhost"

NorthwindPivot.ConnectionString = ConnectionString
NorthwindPivot.CommandText = "Select * From Invoices"

Dim NorthwindView As PivotView
NorthwindView = NorthwindPivot.ActiveView


NorthwindView.RowAxis.InsertFieldSet(NorthwindView.FieldSets("ProductName"),
0)

NorthwindView.ColumnAxis.InsertFieldSet(NorthwindView.FieldSets("SalesPerson"),
0)

NorthwindView.FilterAxis.InsertFieldSet(NorthwindView.FieldSets("ShippedDate"),
0)

NorthwindView.DataAxis.InsertFieldSet(NorthwindView.FieldSets("ExtendedPrice"),
0)


Dim fs As Integer
Dim fld As Integer
For fs = 0 To NorthwindPivot.ActiveView.FieldSets.Count - 1
If NorthwindPivot.ActiveView.FieldSets(fs).Type =
PivotFieldSetTypeEnum.plFieldSetTypeOther Then

ElseIf NorthwindPivot.ActiveView.FieldSets(fs).Type =
PivotFieldSetTypeEnum.plFieldSetTypeTime Then

For fld = 0 To
NorthwindPivot.ActiveView.FieldSets(fs).Fields.Count - 1
Select Case
NorthwindPivot.ActiveView.FieldSets(fs).Fields(fld).Type
Case PivotFieldTypeEnum.plTypeTimeHours,
PivotFieldTypeEnum.plTypeTimeMinutes,
PivotFieldTypeEnum.plTypeTimeSeconds

NorthwindPivot.ActiveView.FieldSets(fs).Fields(fld).IsIncluded = False
End Select
Next

NorthwindPivot.ActiveView.FieldSets(fs).AllIncludeExclude
=
PivotFieldSetAllIncludeExcludeEnum.plAllDefault

End If

Next
 
A

Alvin Bruney [ASP.NET MVP]

I got a copy of your book. It has a lot of material that I have found very
useful including your client side OWC detection system which I have
incorporated into my current solution.
Thanks. Maybe you can post a book review on the website...

Alvin Bruney said:
I have an active support incident with MS (they're taking their jolly time
to get back to me) i'll try to piggy back your request on the ticket for a
resolution but it will take some time (at the speed they are moving)

--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------

Taylor H. Maxwell said:
Thanks for the response Alvin,

The Fieldset object does not have a NumberFormat property. Therefore the
format has to be added to individual fields. Are you thinking of a
different
property on the fieldset object?

I have also tried using the IsIncluded property of the field objects to
try
to make them invisible but this has no affect as well.

I got a copy of your book. It has a lot of material that I have found
very
useful including your client side OWC detection system which I have
incorporated into my current solution.

Alvin Bruney said:
One approach is simply to use the number format property for the
specified
dimention. you can eliminate the extra material or present the date
exactly
as you want it to display in the user interface piece using an
appropriate
format mask that should be passed in to the numberformat property.

--
Regards,
Alvin Bruney

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
------------------------------------------------------------

message Reposting due to lack of response. Anyone trying to work with dates in
Pivot
Tables?

:

I am trying to build an Office OWC 11 Web components pivot table
solution.
Unfortunately, I have not been able to get date fields to show as
desired
(ie, not showing the time information for Hours, Minutes, and
Seconds).

Here is the code I am working with against the Northwind SQL Server
2000
database:

Dim ConnectionString As String = "Provider=SQLOLEDB.1;Persist
Security Info=True;User ID=appapollo;Password=dna;" & _
"Initial Catalog=Northwind;Data Source=localhost"

NorthwindPivot.ConnectionString = ConnectionString
NorthwindPivot.CommandText = "Select * From Invoices"

Dim NorthwindView As PivotView
NorthwindView = NorthwindPivot.ActiveView


NorthwindView.RowAxis.InsertFieldSet(NorthwindView.FieldSets("ProductName"),
0)

NorthwindView.ColumnAxis.InsertFieldSet(NorthwindView.FieldSets("SalesPerson"),
0)

NorthwindView.FilterAxis.InsertFieldSet(NorthwindView.FieldSets("ShippedDate"),
0)

NorthwindView.DataAxis.InsertFieldSet(NorthwindView.FieldSets("ExtendedPrice"),
0)


Dim fs As Integer
Dim fld As Integer
For fs = 0 To NorthwindPivot.ActiveView.FieldSets.Count - 1
If NorthwindPivot.ActiveView.FieldSets(fs).Type =
PivotFieldSetTypeEnum.plFieldSetTypeOther Then

ElseIf NorthwindPivot.ActiveView.FieldSets(fs).Type =
PivotFieldSetTypeEnum.plFieldSetTypeTime Then

For fld = 0 To
NorthwindPivot.ActiveView.FieldSets(fs).Fields.Count - 1
Select Case
NorthwindPivot.ActiveView.FieldSets(fs).Fields(fld).Type
Case PivotFieldTypeEnum.plTypeTimeHours,
PivotFieldTypeEnum.plTypeTimeMinutes,
PivotFieldTypeEnum.plTypeTimeSeconds

NorthwindPivot.ActiveView.FieldSets(fs).Fields(fld).IsIncluded =
False
End Select
Next

NorthwindPivot.ActiveView.FieldSets(fs).AllIncludeExclude
=
PivotFieldSetAllIncludeExcludeEnum.plAllDefault

End If

Next
 
Top