Decimal format

22/10/2007 - 10:28 por Decimal Number Problems | Informe spam
I have a custom list with autocalculate field (Number) then in sharepoint
designer I enter a xls datasource a dataview, and total sum like;

Header --> Work Hours
Line 1 --> Work1 1,20
Line 2 --> Work2 3,50
Line 3 --> Total 4,70

the first problem is that in the line 1 Hour I have NAN, because the output
format of the datasource is #,##0.00 (english number format) then I can't
convert in a number

The second problem is with the sum because $nodeset/@Hours containt a group
of nodes with 1,20 and 3,50 them I can't do this sum

I know that it's languajes insue, but I can't find the solution PLEASE HELP!!!

Preguntas similare

Leer las respuestas

#1 Fabian Imaz
24/10/2007 - 16:46 | Informe spam
Hola,

Antes que nada te pido disculpas por mi ingles, capaz no es el mejor :)

En el siguiente codigo que te adjunto establezco el formato que quiero que
se utilice en mi XSLT para darle formato a los nros.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:decimal-format name="euro" decimal-separator=","
grouping-separator="."/>
<xsl:template match="/">
<xsl:value-of
select="format-number(26825.8, '#.###,00', 'euro')"/>
</xsl:template></xsl:stylesheet>

Como veras estoy utilizando "decimal-format" en la declaracion del XSLT para
establecer el formato que deseo que utilice, después simplemente utilizo la
función "format-number" para formatear la salida de una variable.

Mi correo es , cualquier cosa a las ordenes.

Saludos,
Fabián Imaz
Siderys Elite Software
http://www.siderys.com


"Decimal Number Problems" wrote:

Como veo que hablas español, segiremos en español. el proble,a que tengo se
limita al formato de salida del spdatasource el cual me saca los números en
formato español o europeo 2.545,25 este campo es el campo de entrada en mi
funcion format-number, por lo que si convierto @pasta=2.256,25 en numero
format-number(@pasta,"el formato que sea") me da lo mismo, ya que le estoy
pasando como formato de entrada 2.545,25 la funcion format-number aceptaria
2,545.25. Solo quiero saber si hay alguna forma para indicar al sistema XLST
el formato internacional que debe usar ISO, para que cuando le llege este
tipo de dato lo interprete como un numero. El problema se reproduce tambien
en sum, ya que XLST no puede sumar un conjunto de lo que para mi son numeros
(2,05-6.252,52-5,25 ...)
Supongo que habra alguna forma de configurar xlst para indicar la
configuración internacional,

en sharepoint desing arrastro un origen de datos simplemente y le digo que
muestre campos numericos, y el sistema ya añade la funcion number-format,
pero no muestra los datos, tengo que quitar la funcion format-number para que
muestre los datos como texto, ya que no reconoce el formato 2.565,94 por lo
que yo creo alguna chorrada de configuracion

Por cierto Fabian, se me olvido 2 cosas la primera darte las gracias por
todo y lo segundo mi email


"Fabian Imaz" wrote:

> Hi,
>
> You can prove this function:
> ddwrt:FormatDateTime(string(@fec), 3082, 5), the first parameter is the
> field, a second parameter is the language, and the third is a type of format.
> The value of third parameter could be: 1,3,4,5,7,12,13 y 15, each value
> represent a diferent format for datetiem.
> Fabián Imaz
> Siderys Elite Software
> http://www.siderys.com
>
>
> "Decimal Number Problems" wrote:
>
> > Yes I do it, but the problem is the imput data, you can test
> > format-number(@Horurs, '#,##0.#;-#,##0.#'), @Hours=3.256,25 or directy
> > format-number(3.256,25, '#,##0.#;-#,##0.#'), both results are NaN, my
> > problems start when the sharepoint lists return the numbers in spanish
> > (european) format, 3.252,25 them format-number function Crash. It's happent
> > too with the sum function, how can I sum a node group of spanish numbers,
> > normaly I had to use sum ($nodeset/@Hours) but it's the same CRASH. when the
> > options in xls:decimal-format name=european decimal-separator=',' groping..>
> > you only express the output format, but I need that the function
> > format-number recognize de european format or the way to translate to english
> > format to convert in spanish format.
> >
> > But it's reallysubrealist, I only need that format-number recognize spanish
> > or europen format to translate my datafield in a number.
> > "Fabian Imaz" wrote:
> >
> > > Hi,
> > > You proved to use the functions of conversion and format of XSLT. When you
> > > use XSLT you can create expression xpaht with the sharepoint designer
> > > and there you found functions that helped you with this task. Here you have
> > > an example <xsl:value-of select="format-number(@ID, '#,##0.#;-#,##0.#')"/>.
> > >
> > > Fabián Imaz
> > > Siderys Elite Software
> > > http://www.siderys.com
> > >
> > >
> > > "Decimal Number Problems" wrote:
> > >
> > > > I have a custom list with autocalculate field (Number) then in sharepoint
> > > > designer I enter a xls datasource a dataview, and total sum like;
> > > >
> > > > Header --> Work Hours
> > > > Line 1 --> Work1 1,20
> > > > Line 2 --> Work2 3,50
> > > > Line 3 --> Total 4,70
> > > >
> > > > the first problem is that in the line 1 Hour I have NAN, because the output
> > > > format of the datasource is #,##0.00 (english number format) then I can't
> > > > convert in a number
> > > >
> > > > The second problem is with the sum because $nodeset/@Hours containt a group
> > > > of nodes with 1,20 and 3,50 them I can't do this sum
> > > >
> > > > I know that it's languajes insue, but I can't find the solution PLEASE HELP!!!
Respuesta Responder a este mensaje
#2 Decimal Number Problems
25/10/2007 - 14:49 | Informe spam
Si eso lo comprendo bien, el problema
es que format-number los uso soble un campo recuperado mediante spdatasource
@horas y @horas=3,02
cuando le paso el format-number(@horas,'#.###,00', 'euro') me da error ya
que no puede tranformar esa entrada 3,02. Y lo que quiero saber es configurar
ISO para que o bien spdatasource me devuelva 5.02 o que format-number acepte
3,02

Lo que te comente anteriormente, si arrastras en microsoft desing un
origenen de datos (lista) con un campo númerico, verás si lo tienes
configurado el sitio en español como los campos numericos no te los muestra
ya que lo mete en el select=format-number(@horas,...)" y la única forma que
hay para mostrar el dato es pasandolo como texto select="@horas", con el
problema que no puedes manipular el dato multiplicandolo, dividiendolo, o lo
que sea


"Fabian Imaz" wrote:

Hola,

Antes que nada te pido disculpas por mi ingles, capaz no es el mejor :)

En el siguiente codigo que te adjunto establezco el formato que quiero que
se utilice en mi XSLT para darle formato a los nros.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:decimal-format name="euro" decimal-separator=","
grouping-separator="."/>
<xsl:template match="/">
<xsl:value-of
select="format-number(26825.8, '#.###,00', 'euro')"/>
</xsl:template></xsl:stylesheet>

Como veras estoy utilizando "decimal-format" en la declaracion del XSLT para
establecer el formato que deseo que utilice, después simplemente utilizo la
función "format-number" para formatear la salida de una variable.

Mi correo es , cualquier cosa a las ordenes.

Saludos,
Fabián Imaz
Siderys Elite Software
http://www.siderys.com


"Decimal Number Problems" wrote:

> Como veo que hablas español, segiremos en español. el proble,a que tengo se
> limita al formato de salida del spdatasource el cual me saca los números en
> formato español o europeo 2.545,25 este campo es el campo de entrada en mi
> funcion format-number, por lo que si convierto @pasta=2.256,25 en numero
> format-number(@pasta,"el formato que sea") me da lo mismo, ya que le estoy
> pasando como formato de entrada 2.545,25 la funcion format-number aceptaria
> 2,545.25. Solo quiero saber si hay alguna forma para indicar al sistema XLST
> el formato internacional que debe usar ISO, para que cuando le llege este
> tipo de dato lo interprete como un numero. El problema se reproduce tambien
> en sum, ya que XLST no puede sumar un conjunto de lo que para mi son numeros
> (2,05-6.252,52-5,25 ...)
> Supongo que habra alguna forma de configurar xlst para indicar la
> configuración internacional,
>
> en sharepoint desing arrastro un origen de datos simplemente y le digo que
> muestre campos numericos, y el sistema ya añade la funcion number-format,
> pero no muestra los datos, tengo que quitar la funcion format-number para que
> muestre los datos como texto, ya que no reconoce el formato 2.565,94 por lo
> que yo creo alguna chorrada de configuracion
>
> Por cierto Fabian, se me olvido 2 cosas la primera darte las gracias por
> todo y lo segundo mi email
>
>
> "Fabian Imaz" wrote:
>
> > Hi,
> >
> > You can prove this function:
> > ddwrt:FormatDateTime(string(@fec), 3082, 5), the first parameter is the
> > field, a second parameter is the language, and the third is a type of format.
> > The value of third parameter could be: 1,3,4,5,7,12,13 y 15, each value
> > represent a diferent format for datetiem.
> > Fabián Imaz
> > Siderys Elite Software
> > http://www.siderys.com
> >
> >
> > "Decimal Number Problems" wrote:
> >
> > > Yes I do it, but the problem is the imput data, you can test
> > > format-number(@Horurs, '#,##0.#;-#,##0.#'), @Hours=3.256,25 or directy
> > > format-number(3.256,25, '#,##0.#;-#,##0.#'), both results are NaN, my
> > > problems start when the sharepoint lists return the numbers in spanish
> > > (european) format, 3.252,25 them format-number function Crash. It's happent
> > > too with the sum function, how can I sum a node group of spanish numbers,
> > > normaly I had to use sum ($nodeset/@Hours) but it's the same CRASH. when the
> > > options in xls:decimal-format name=european decimal-separator=',' groping..>
> > > you only express the output format, but I need that the function
> > > format-number recognize de european format or the way to translate to english
> > > format to convert in spanish format.
> > >
> > > But it's reallysubrealist, I only need that format-number recognize spanish
> > > or europen format to translate my datafield in a number.
> > > "Fabian Imaz" wrote:
> > >
> > > > Hi,
> > > > You proved to use the functions of conversion and format of XSLT. When you
> > > > use XSLT you can create expression xpaht with the sharepoint designer
> > > > and there you found functions that helped you with this task. Here you have
> > > > an example <xsl:value-of select="format-number(@ID, '#,##0.#;-#,##0.#')"/>.
> > > >
> > > > Fabián Imaz
> > > > Siderys Elite Software
> > > > http://www.siderys.com
> > > >
> > > >
> > > > "Decimal Number Problems" wrote:
> > > >
> > > > > I have a custom list with autocalculate field (Number) then in sharepoint
> > > > > designer I enter a xls datasource a dataview, and total sum like;
> > > > >
> > > > > Header --> Work Hours
> > > > > Line 1 --> Work1 1,20
> > > > > Line 2 --> Work2 3,50
> > > > > Line 3 --> Total 4,70
> > > > >
> > > > > the first problem is that in the line 1 Hour I have NAN, because the output
> > > > > format of the datasource is #,##0.00 (english number format) then I can't
> > > > > convert in a number
> > > > >
> > > > > The second problem is with the sum because $nodeset/@Hours containt a group
> > > > > of nodes with 1,20 and 3,50 them I can't do this sum
> > > > >
> > > > > I know that it's languajes insue, but I can't find the solution PLEASE HELP!!!
Respuesta Responder a este mensaje
#3 Fabian Imaz
26/10/2007 - 14:15 | Informe spam
Hola,

La vdd que pude reproducir el problema que tuviste y no pude encontrar una
solución al mismo. El problema esta en como es tratado el campo por la lista
(origen de datos) dado que cuando lo cargo en Sharepoint (por la lista) lo
ingreso con una "," para separar los decimales, pero después en el Sharepoint
Designer no me lo reconoce como un formato númerico valido. Cambie la
configuración del XSLT varias veces pero el problema sigue estando.
La unica fomra que se me ocurre que podes hacer eso y transformarlo a un
numero (no es la mejor) es descomponiendo el campo con funciones de texto.
Este fin de seman voy a investigar a que se debe y si tengo alguna novedad
te la comento.

Nuevamente disculpas por no poderte ayudar a resolver el problema.

Saludos,
Fabián Imaz
Siderys Elite Software
http://www.siderys.com


"Decimal Number Problems" wrote:

Si eso lo comprendo bien, el problema
es que format-number los uso soble un campo recuperado mediante spdatasource
@horas y @horas=3,02
cuando le paso el format-number(@horas,'#.###,00', 'euro') me da error ya
que no puede tranformar esa entrada 3,02. Y lo que quiero saber es configurar
ISO para que o bien spdatasource me devuelva 5.02 o que format-number acepte
3,02

Lo que te comente anteriormente, si arrastras en microsoft desing un
origenen de datos (lista) con un campo númerico, verás si lo tienes
configurado el sitio en español como los campos numericos no te los muestra
ya que lo mete en el select=format-number(@horas,...)" y la única forma que
hay para mostrar el dato es pasandolo como texto select="@horas", con el
problema que no puedes manipular el dato multiplicandolo, dividiendolo, o lo
que sea


"Fabian Imaz" wrote:

> Hola,
>
> Antes que nada te pido disculpas por mi ingles, capaz no es el mejor :)
>
> En el siguiente codigo que te adjunto establezco el formato que quiero que
> se utilice en mi XSLT para darle formato a los nros.
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:decimal-format name="euro" decimal-separator=","
> grouping-separator="."/>
> <xsl:template match="/">
> <xsl:value-of
> select="format-number(26825.8, '#.###,00', 'euro')"/>
> </xsl:template></xsl:stylesheet>
>
> Como veras estoy utilizando "decimal-format" en la declaracion del XSLT para
> establecer el formato que deseo que utilice, después simplemente utilizo la
> función "format-number" para formatear la salida de una variable.
>
> Mi correo es , cualquier cosa a las ordenes.
>
> Saludos,
> Fabián Imaz
> Siderys Elite Software
> http://www.siderys.com
>
>
> "Decimal Number Problems" wrote:
>
> > Como veo que hablas español, segiremos en español. el proble,a que tengo se
> > limita al formato de salida del spdatasource el cual me saca los números en
> > formato español o europeo 2.545,25 este campo es el campo de entrada en mi
> > funcion format-number, por lo que si convierto @pasta=2.256,25 en numero
> > format-number(@pasta,"el formato que sea") me da lo mismo, ya que le estoy
> > pasando como formato de entrada 2.545,25 la funcion format-number aceptaria
> > 2,545.25. Solo quiero saber si hay alguna forma para indicar al sistema XLST
> > el formato internacional que debe usar ISO, para que cuando le llege este
> > tipo de dato lo interprete como un numero. El problema se reproduce tambien
> > en sum, ya que XLST no puede sumar un conjunto de lo que para mi son numeros
> > (2,05-6.252,52-5,25 ...)
> > Supongo que habra alguna forma de configurar xlst para indicar la
> > configuración internacional,
> >
> > en sharepoint desing arrastro un origen de datos simplemente y le digo que
> > muestre campos numericos, y el sistema ya añade la funcion number-format,
> > pero no muestra los datos, tengo que quitar la funcion format-number para que
> > muestre los datos como texto, ya que no reconoce el formato 2.565,94 por lo
> > que yo creo alguna chorrada de configuracion
> >
> > Por cierto Fabian, se me olvido 2 cosas la primera darte las gracias por
> > todo y lo segundo mi email
> >
> >
> > "Fabian Imaz" wrote:
> >
> > > Hi,
> > >
> > > You can prove this function:
> > > ddwrt:FormatDateTime(string(@fec), 3082, 5), the first parameter is the
> > > field, a second parameter is the language, and the third is a type of format.
> > > The value of third parameter could be: 1,3,4,5,7,12,13 y 15, each value
> > > represent a diferent format for datetiem.
> > > Fabián Imaz
> > > Siderys Elite Software
> > > http://www.siderys.com
> > >
> > >
> > > "Decimal Number Problems" wrote:
> > >
> > > > Yes I do it, but the problem is the imput data, you can test
> > > > format-number(@Horurs, '#,##0.#;-#,##0.#'), @Hours=3.256,25 or directy
> > > > format-number(3.256,25, '#,##0.#;-#,##0.#'), both results are NaN, my
> > > > problems start when the sharepoint lists return the numbers in spanish
> > > > (european) format, 3.252,25 them format-number function Crash. It's happent
> > > > too with the sum function, how can I sum a node group of spanish numbers,
> > > > normaly I had to use sum ($nodeset/@Hours) but it's the same CRASH. when the
> > > > options in xls:decimal-format name=european decimal-separator=',' groping..>
> > > > you only express the output format, but I need that the function
> > > > format-number recognize de european format or the way to translate to english
> > > > format to convert in spanish format.
> > > >
> > > > But it's reallysubrealist, I only need that format-number recognize spanish
> > > > or europen format to translate my datafield in a number.
> > > > "Fabian Imaz" wrote:
> > > >
> > > > > Hi,
> > > > > You proved to use the functions of conversion and format of XSLT. When you
> > > > > use XSLT you can create expression xpaht with the sharepoint designer
> > > > > and there you found functions that helped you with this task. Here you have
> > > > > an example <xsl:value-of select="format-number(@ID, '#,##0.#;-#,##0.#')"/>.
> > > > >
> > > > > Fabián Imaz
> > > > > Siderys Elite Software
> > > > > http://www.siderys.com
> > > > >
> > > > >
> > > > > "Decimal Number Problems" wrote:
> > > > >
> > > > > > I have a custom list with autocalculate field (Number) then in sharepoint
> > > > > > designer I enter a xls datasource a dataview, and total sum like;
> > > > > >
> > > > > > Header --> Work Hours
> > > > > > Line 1 --> Work1 1,20
> > > > > > Line 2 --> Work2 3,50
> > > > > > Line 3 --> Total 4,70
> > > > > >
> > > > > > the first problem is that in the line 1 Hour I have NAN, because the output
> > > > > > format of the datasource is #,##0.00 (english number format) then I can't
> > > > > > convert in a number
> > > > > >
> > > > > > The second problem is with the sum because $nodeset/@Hours containt a group
> > > > > > of nodes with 1,20 and 3,50 them I can't do this sum
> > > > > >
> > > > > > I know that it's languajes insue, but I can't find the solution PLEASE HELP!!!
Respuesta Responder a este mensaje
#4 Decimal Number Problems
29/10/2007 - 08:35 | Informe spam
Primero reitero mil gracias, segundo no te vuelvas a disculpar por nada,
agradezco sinceramente el esfuerzo.

Lo he conseguido con la funcion tranlate, pero claro aplicado a un valor,
para un conjunto de nodos, para poder aplicar la funcion sum, ya no lo he
conseguido, creo que si no tiene una solucción real, estamos ante lo que
puede ser una cagada, a mi juicio tremenda.

"Fabian Imaz" wrote:

Hola,

La vdd que pude reproducir el problema que tuviste y no pude encontrar una
solución al mismo. El problema esta en como es tratado el campo por la lista
(origen de datos) dado que cuando lo cargo en Sharepoint (por la lista) lo
ingreso con una "," para separar los decimales, pero después en el Sharepoint
Designer no me lo reconoce como un formato númerico valido. Cambie la
configuración del XSLT varias veces pero el problema sigue estando.
La unica fomra que se me ocurre que podes hacer eso y transformarlo a un
numero (no es la mejor) es descomponiendo el campo con funciones de texto.
Este fin de seman voy a investigar a que se debe y si tengo alguna novedad
te la comento.

Nuevamente disculpas por no poderte ayudar a resolver el problema.

Saludos,
Fabián Imaz
Siderys Elite Software
http://www.siderys.com


"Decimal Number Problems" wrote:

> Si eso lo comprendo bien, el problema
> es que format-number los uso soble un campo recuperado mediante spdatasource
> @horas y @horas=3,02
> cuando le paso el format-number(@horas,'#.###,00', 'euro') me da error ya
> que no puede tranformar esa entrada 3,02. Y lo que quiero saber es configurar
> ISO para que o bien spdatasource me devuelva 5.02 o que format-number acepte
> 3,02
>
> Lo que te comente anteriormente, si arrastras en microsoft desing un
> origenen de datos (lista) con un campo númerico, verás si lo tienes
> configurado el sitio en español como los campos numericos no te los muestra
> ya que lo mete en el select=format-number(@horas,...)" y la única forma que
> hay para mostrar el dato es pasandolo como texto select="@horas", con el
> problema que no puedes manipular el dato multiplicandolo, dividiendolo, o lo
> que sea
>
>
> "Fabian Imaz" wrote:
>
> > Hola,
> >
> > Antes que nada te pido disculpas por mi ingles, capaz no es el mejor :)
> >
> > En el siguiente codigo que te adjunto establezco el formato que quiero que
> > se utilice en mi XSLT para darle formato a los nros.
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > <xsl:decimal-format name="euro" decimal-separator=","
> > grouping-separator="."/>
> > <xsl:template match="/">
> > <xsl:value-of
> > select="format-number(26825.8, '#.###,00', 'euro')"/>
> > </xsl:template></xsl:stylesheet>
> >
> > Como veras estoy utilizando "decimal-format" en la declaracion del XSLT para
> > establecer el formato que deseo que utilice, después simplemente utilizo la
> > función "format-number" para formatear la salida de una variable.
> >
> > Mi correo es , cualquier cosa a las ordenes.
> >
> > Saludos,
> > Fabián Imaz
> > Siderys Elite Software
> > http://www.siderys.com
> >
> >
> > "Decimal Number Problems" wrote:
> >
> > > Como veo que hablas español, segiremos en español. el proble,a que tengo se
> > > limita al formato de salida del spdatasource el cual me saca los números en
> > > formato español o europeo 2.545,25 este campo es el campo de entrada en mi
> > > funcion format-number, por lo que si convierto @pasta=2.256,25 en numero
> > > format-number(@pasta,"el formato que sea") me da lo mismo, ya que le estoy
> > > pasando como formato de entrada 2.545,25 la funcion format-number aceptaria
> > > 2,545.25. Solo quiero saber si hay alguna forma para indicar al sistema XLST
> > > el formato internacional que debe usar ISO, para que cuando le llege este
> > > tipo de dato lo interprete como un numero. El problema se reproduce tambien
> > > en sum, ya que XLST no puede sumar un conjunto de lo que para mi son numeros
> > > (2,05-6.252,52-5,25 ...)
> > > Supongo que habra alguna forma de configurar xlst para indicar la
> > > configuración internacional,
> > >
> > > en sharepoint desing arrastro un origen de datos simplemente y le digo que
> > > muestre campos numericos, y el sistema ya añade la funcion number-format,
> > > pero no muestra los datos, tengo que quitar la funcion format-number para que
> > > muestre los datos como texto, ya que no reconoce el formato 2.565,94 por lo
> > > que yo creo alguna chorrada de configuracion
> > >
> > > Por cierto Fabian, se me olvido 2 cosas la primera darte las gracias por
> > > todo y lo segundo mi email
> > >
> > >
> > > "Fabian Imaz" wrote:
> > >
> > > > Hi,
> > > >
> > > > You can prove this function:
> > > > ddwrt:FormatDateTime(string(@fec), 3082, 5), the first parameter is the
> > > > field, a second parameter is the language, and the third is a type of format.
> > > > The value of third parameter could be: 1,3,4,5,7,12,13 y 15, each value
> > > > represent a diferent format for datetiem.
> > > > Fabián Imaz
> > > > Siderys Elite Software
> > > > http://www.siderys.com
> > > >
> > > >
> > > > "Decimal Number Problems" wrote:
> > > >
> > > > > Yes I do it, but the problem is the imput data, you can test
> > > > > format-number(@Horurs, '#,##0.#;-#,##0.#'), @Hours=3.256,25 or directy
> > > > > format-number(3.256,25, '#,##0.#;-#,##0.#'), both results are NaN, my
> > > > > problems start when the sharepoint lists return the numbers in spanish
> > > > > (european) format, 3.252,25 them format-number function Crash. It's happent
> > > > > too with the sum function, how can I sum a node group of spanish numbers,
> > > > > normaly I had to use sum ($nodeset/@Hours) but it's the same CRASH. when the
> > > > > options in xls:decimal-format name=european decimal-separator=',' groping..>
> > > > > you only express the output format, but I need that the function
> > > > > format-number recognize de european format or the way to translate to english
> > > > > format to convert in spanish format.
> > > > >
> > > > > But it's reallysubrealist, I only need that format-number recognize spanish
> > > > > or europen format to translate my datafield in a number.
> > > > > "Fabian Imaz" wrote:
> > > > >
> > > > > > Hi,
> > > > > > You proved to use the functions of conversion and format of XSLT. When you
> > > > > > use XSLT you can create expression xpaht with the sharepoint designer
> > > > > > and there you found functions that helped you with this task. Here you have
> > > > > > an example <xsl:value-of select="format-number(@ID, '#,##0.#;-#,##0.#')"/>.
> > > > > >
> > > > > > Fabián Imaz
> > > > > > Siderys Elite Software
> > > > > > http://www.siderys.com
> > > > > >
> > > > > >
> > > > > > "Decimal Number Problems" wrote:
> > > > > >
> > > > > > > I have a custom list with autocalculate field (Number) then in sharepoint
> > > > > > > designer I enter a xls datasource a dataview, and total sum like;
> > > > > > >
> > > > > > > Header --> Work Hours
> > > > > > > Line 1 --> Work1 1,20
> > > > > > > Line 2 --> Work2 3,50
> > > > > > > Line 3 --> Total 4,70
> > > > > > >
> > > > > > > the first problem is that in the line 1 Hour I have NAN, because the output
> > > > > > > format of the datasource is #,##0.00 (english number format) then I can't
> > > > > > > convert in a number
> > > > > > >
> > > > > > > The second problem is with the sum because $nodeset/@Hours containt a group
> > > > > > > of nodes with 1,20 and 3,50 them I can't do this sum
> > > > > > >
> > > > > > > I know that it's languajes insue, but I can't find the solution PLEASE HELP!!!
Respuesta Responder a este mensaje
#5 fabianimaz
29/10/2007 - 23:47 | Informe spam
On 29 oct, 04:35, Decimal Number Problems
wrote:
Primero reitero mil gracias, segundo no te vuelvas a disculpar por nada,
agradezco sinceramente el esfuerzo.

Lo he conseguido con la funcion tranlate, pero claro aplicado a un valor,
para un conjunto de nodos, para poder aplicar la funcion sum, ya no lo he
conseguido, creo que si no tiene una solucción real, estamos ante lo que
puede ser una cagada, a mi juicio tremenda.



"Fabian Imaz" wrote:
> Hola,

> La vdd que pude reproducir el problema que tuviste y no pude encontrar una
> solución al mismo. El problema esta en como es tratado el campo por la lista
> (origen de datos) dado que cuando lo cargo en Sharepoint (por la lista) lo
> ingreso con una "," para separar los decimales, pero después en el Sharepoint
> Designer no me lo reconoce como un formato númerico valido. Cambie la
> configuración del XSLT varias veces pero el problema sigue estando.
> La unica fomra que se me ocurre que podes hacer eso y transformarlo a un
> numero (no es la mejor) es descomponiendo el campo con funciones de texto.
> Este fin de seman voy a investigar a que se debe y si tengo alguna novedad
> te la comento.

> Nuevamente disculpas por no poderte ayudar a resolver el problema.

> Saludos,
> Fabián Imaz
> Siderys Elite Software
>http://www.siderys.com

> "Decimal Number Problems" wrote:

> > Si eso lo comprendo bien, el problema
> > es que format-number los uso soble un campo recuperado mediante spdatasource
> > @horas y @horas=3,02
> > cuando le paso el format-number(@horas,'#.###,00', 'euro') me da error ya
> > que no puede tranformar esa entrada 3,02. Y lo que quiero saber es configurar
> > ISO para que o bien spdatasource me devuelva 5.02 o que format-number acepte
> > 3,02

> > Lo que te comente anteriormente, si arrastras en microsoft desing un
> > origenen de datos (lista) con un campo númerico, verás si lo tienes
> > configurado el sitio en español como los campos numericos no te los muestra
> > ya que lo mete en el select=format-number(@horas,...)" y la única forma que
> > hay para mostrar el dato es pasandolo como texto select="@horas", con el
> > problema que no puedes manipular el dato multiplicandolo, dividiendolo, o lo
> > que sea

> > "Fabian Imaz" wrote:

> > > Hola,

> > > Antes que nada te pido disculpas por mi ingles, capaz no es el mejor :)

> > > En el siguiente codigo que te adjunto establezco el formato que quiero que
> > > se utilice en mi XSLT para darle formato a los nros.
> > > <?xml version="1.0" encoding="ISO-8859-1"?>
> > > <xsl:stylesheet version="1.0"
> > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > > <xsl:decimal-format name="euro" decimal-separator=","
> > > grouping-separator="."/>
> > > <xsl:template match="/">
> > > <xsl:value-of
> > > select="format-number(26825.8, '#.###,00', 'euro')"/>
> > > </xsl:template></xsl:stylesheet>

> > > Como veras estoy utilizando "decimal-format" en la declaracion del XSLT para
> > > establecer el formato que deseo que utilice, después simplemente utilizo la
> > > función "format-number" para formatear la salida de una variable.

> > > Mi correo es , cualquier cosa a las ordenes.

> > > Saludos,
> > > Fabián Imaz
> > > Siderys Elite Software
> > >http://www.siderys.com

> > > "Decimal Number Problems" wrote:

> > > > Como veo que hablas español, segiremos en español. el proble,a que tengo se
> > > > limita al formato de salida del spdatasource el cual me saca los números en
> > > > formato español o europeo 2.545,25 este campo es el campo de entrada en mi
> > > > funcion format-number, por lo que si convierto @pasta=2.256,25 en numero
> > > > format-number(@pasta,"el formato que sea") me da lo mismo, ya que le estoy
> > > > pasando como formato de entrada 2.545,25 la funcion format-number aceptaria
> > > > 2,545.25. Solo quiero saber si hay alguna forma para indicar al sistema XLST
> > > > el formato internacional que debe usar ISO, para que cuando le llege este
> > > > tipo de dato lo interprete como un numero. El problema se reproduce tambien
> > > > en sum, ya que XLST no puede sumar un conjunto de lo que para mi son numeros
> > > > (2,05-6.252,52-5,25 ...)
> > > > Supongo que habra alguna forma de configurar xlst para indicar la
> > > > configuración internacional,

> > > > en sharepoint desing arrastro un origen de datos simplemente y le digo que
> > > > muestre campos numericos, y el sistema ya añade la funcion number-format,
> > > > pero no muestra los datos, tengo que quitar la funcion format-number para que
> > > > muestre los datos como texto, ya que no reconoce el formato 2.565,94 por lo
> > > > que yo creo alguna chorrada de configuracion

> > > > Por cierto Fabian, se me olvido 2 cosas la primera darte las gracias por
> > > > todo y lo segundo mi email

> > > > "Fabian Imaz" wrote:

> > > > > Hi,

> > > > > You can prove this function:
> > > > > ddwrt:FormatDateTime(string(@fec), 3082, 5), the first parameter is the
> > > > > field, a second parameter is the language, and the third is a type of format.
> > > > > The value of third parameter could be: 1,3,4,5,7,12,13 y 15, each value
> > > > > represent a diferent format for datetiem.
> > > > > Fabián Imaz
> > > > > Siderys Elite Software
> > > > >http://www.siderys.com

> > > > > "Decimal Number Problems" wrote:

> > > > > > Yes I do it, but the problem is the imput data, you can test
> > > > > > format-number(@Horurs, '#,##0.#;-#,##0.#'), @Hours=3.256,25 or directy
> > > > > > format-number(3.256,25, '#,##0.#;-#,##0.#'), both results are NaN, my
> > > > > > problems start when the sharepoint lists return the numbers in spanish
> > > > > > (european) format, 3.252,25 them format-number function Crash. It's happent
> > > > > > too with the sum function, how can I sum a node group of spanish numbers,
> > > > > > normaly I had to use sum ($nodeset/@Hours) but it's the same CRASH. when the
> > > > > > options in xls:decimal-format name=european decimal-separator=',' groping..>
> > > > > > you only express the output format, but I need that the function
> > > > > > format-number recognize de european format or the way to translate to english
> > > > > > format to convert in spanish format.

> > > > > > But it's reallysubrealist, I only need that format-number recognize spanish
> > > > > > or europen format to translate my datafield in a number.
> > > > > > "Fabian Imaz" wrote:

> > > > > > > Hi,
> > > > > > > You proved to use the functions of conversion and format of XSLT. When you
> > > > > > > use XSLT you can create expression xpaht with the sharepoint designer
> > > > > > > and there you found functions that helped you with this task. Here you have
> > > > > > > an example <xsl:value-of select="format-number(@ID, '#,##0.#;-#,##0.#')"/>.

> > > > > > > Fabián Imaz
> > > > > > > Siderys Elite Software
> > > > > > >http://www.siderys.com

> > > > > > > "Decimal Number Problems" wrote:

> > > > > > > > I have a custom list with autocalculate field (Number) then in sharepoint
> > > > > > > > designer I enter a xls datasource a dataview, and total sum like;

> > > > > > > > Header --> Work Hours
> > > > > > > > Line 1 --> Work1 1,20
> > > > > > > > Line 2 --> Work2 3,50
> > > > > > > > Line 3 --> Total 4,70

> > > > > > > > the first problem is that in the line 1 Hour I have NAN, because the output
> > > > > > > > format of the datasource is #,##0.00 (english number format) then I can't
> > > > > > > > convert in a number

> > > > > > > > The second problem is with the sum because $nodeset/@Hours containt a group
> > > > > > > > of nodes with 1,20 and 3,50 them I can't do this sum

> > > > > > > > I know that it's languajes insue, but I can't find the solution PLEASE HELP!!!- Ocultar texto de la cita -

- Mostrar texto de la cita -



Hola, tu puedes pasarme un Back UP o un template de la lista con el
formulario para probar sobre el mismo caso, yo lo levanto en mi
servidor de Sharepoint y vemos los dos lo mismo para intentar llegar a
una solucion al problema. Que te parec?

Saludos,
Fabián Imaz
email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida