![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, In AS 2000, when you change the regional formatting settings to French then the numbers formatted with "#,#.00" strings are displayed in Analysis Manager with spaces as thousand separators and commas as decimal separators (e.g. "1 234,56". A simple Windows app using ADOMD.NET displays similar results. A web app (written in VS 2003) however always seems to use the English format ("1,234.56"). If the same app is written in VS 2005 and uses ADOMD.NET version 9, the French formatting can be seen while running it from inside the delopment environment ("View in Browser"). The English formatting is seen while running the web app outside of the development environment. Is there any way to solve this for AS 2000? How can this be contolled in AS 2005? Thanks in advance for any suggestions, Stan |
#3
| |||
| |||
|
|
This is the code I'm running in the web page: Dim clCommand As AdomdCommand Dim clConnection As New AdomdConnection Dim clXmlReader As XmlReader Dim nEnd As Integer Dim nStart As Integer Dim strEndTag As String = "</FmtValue>" Dim strQuery As String = _ "SELECT {[Measures].[Store Sales]} ON COLUMNS FROM [Sales]" Dim strStartTag As String = "<FmtValue>" Dim strText As String clConnection.ConnectionString = _ "Provider=MSOLAP;ConnectTo=8.0;Data Source=localhost;Catalog=Foodmart 2000" clConnection.Open() clCommand = New AdomdCommand clCommand.Connection = clConnection clCommand.CommandText = strQuery clXmlReader = clCommand.ExecuteXmlReader() strText = clXmlReader.ReadInnerXml clXmlReader.Close() nStart = InStrRev(strText, strStartTag) + Len(strStartTag) nEnd = InStrRev(strText, strEndTag) strText = Mid(strText, nStart, nEnd - nStart) Response.Write("Formatted Cell Value from XmlReader: " & strText) clConnection.Close() The output is: Formatted Cell Value from XmlReader: $565,238.13 When the same code is run from the windows app (replacing Response.Write with MsgBox) the output is: Formatted Cell Value from XmlReader: 565 238,13 $ When the web page is run from within VS 2005 (View in Browser or Debug), the output is: Formatted Cell Value from XmlReader: 565 238,13 $ Is this a bug? /Stan "Stan Kondrat" wrote: Hi, In AS 2000, when you change the regional formatting settings to French then the numbers formatted with "#,#.00" strings are displayed in Analysis Manager with spaces as thousand separators and commas as decimal separators (e.g. "1 234,56". A simple Windows app using ADOMD.NET displays similar results. A web app (written in VS 2003) however always seems to use the English format ("1,234.56"). If the same app is written in VS 2005 and uses ADOMD.NET version 9, the French formatting can be seen while running it from inside the delopment environment ("View in Browser"). The English formatting is seen while running the web app outside of the development environment. Is there any way to solve this for AS 2000? How can this be contolled in AS 2005? Thanks in advance for any suggestions, Stan |
![]() |
| Thread Tools | |
| Display Modes | |
| |