Crystal Report - Ayuda ToWords(español) crxlat32 .dll

 
Vista:

Ayuda ToWords(español) crxlat32 .dll

Publicado por RafaFlo (3 intervenciones) el 19/05/2009 03:44:06
Hola Buenas noches, fijense que estroy trabajando con crystal reports 8.5 y la funcion towords() que convientre numeros en una cadena de letras, pero la version que tengo es en ingles y necesito que mi programa haga esa funcion pero en español.Si alguein me pudiera pasar la dll crlat32, por que segun he leido ahi es dodne esta la funcion. Ya la busque por todas partes y no la encuentro en español, supongo que ha de ser por que ya no es tan actual el tema y segun lei ya ha muchos les paso en el pasado, pero la mayoria de los foros con problemas similares son del 2007 o anteriores. Si alguno de uds compañeros me ayudan gracias o minimo me digan donde puedo bajarla pero que sea seguro que este en español.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por Hernold Cordero (2 intervenciones) el 11/06/2009 00:19:12
TEngo el mismo problema.....donde la puedo encontrar en español...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por RafaFlo (3 intervenciones) el 11/06/2009 16:26:33
Hola, la verdad que yo me canse de buscar la dichosos DLL, pero lo solucione con la sigiente funcion . Solo donde dcie @curTotal, lo sustitulles por el nombre del campo numero que deseas optener la cadena de caracteres y listo. Espeor te ayude, aparte en un futuro no te vas a tener que procupar si en la maquina que instales tu sistema tienen o no la DLL. en español.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
numberVar x := tonumber({@curTotal});
 
stringVar unidad :="" ;
stringVar decena :="" ;
stringVar centena :="" ;
 
stringVar umil :="" ;
stringVar dmil :="" ;
stringVar cmil :="" ;
 
stringVar umill :="" ;
stringVar dmill :="" ;
stringVar cmill :="" ;
 
stringVar umilmil :="" ;
stringVar dmilmil :="" ;
stringVar cmilmil :="" ;
 
stringVar caracter:="" ;
numberVar i :=0 ;
numberVar long :=length(totext(x)) ;
numberVar lugar :=0;
 
caracter:=totext(x);
 
i=long;
lugar:=long;
//000 123 456 789.00 
for i :=1 to long step 1 do
(
//123 decimales 456 unidades 
if i=4 then
(
unidad:=left(right(caracter,i),1);
)
else if i=5 then
(
decena:=left(right(caracter,i),1);
)
 
else if i=6 then
(
centena:=left(right(caracter,i),1);
);
 
//miles 
 
if i=8 then
(
umil:=left(right(caracter,i),1);
)
else if i=9 then
(
dmil:=left(right(caracter,i),1);
)
 
else if i=10 then
(
cmil:=left(right(caracter,i),1);
);
 
//millones 
if i=12 then
(
umill:=left(right(caracter,i),1);
)
else if i=13 then
(
dmill:=left(right(caracter,i),1);
)
 
else if i=14 then
(
cmill:=left(right(caracter,i),1);
);
 
//mil millones 
if i=16 then
(
umilmil:=left(right(caracter,i),1);
)
else if i=17 then
(
dmilmil:=left(right(caracter,i),1);
)
 
else if i=18 then
(
cmilmil:=left(right(caracter,i),1);
)
 
);
////123 456 789.00 
 
stringVar array unidades := ["un","dos","tres","cuatro","cinco","seis","siete","ocho","nueve"];
stringVar array dieces := ["once","doce","trece","catorce","quince","diez y seis","diez y siete","diez y ocho","diez y nueve"];
stringVar array decenas := ["diez","veinte","treinta","cuarenta","cincuenta","sesenta","setenta","ochenta","noventa"];
stringVar array centenas := ["ciento","doscientos","trescientos","cuatrocientos","quinientos","seiscientos","setecientos","ochocientos","novecientos"];
stringVar resultado:="";
stringVar procesar:="N";
 
//mil millones igual a los miles 
procesar:="N";
if val(cmilmil)>0 then
resultado:=resultado + centenas[val(cmilmil)] + " ";
 
if val(dmilmil)>1 then
resultado:=resultado + decenas[val(dmilmil)] + " y "
else if val(dmilmil)=1 then
procesar:="S";
 
if procesar="S" then //quiere decir que es un numero entre 11 y 20 
(
if val(umilmil)>0 then
resultado:=resultado + dieces[val(umilmil)] + " ";
)
else
(
if val(umilmil)>0 then
resultado:=resultado + unidades[val(umilmil)] + " ";
);
 
if val(cmilmil)+val(dmilmil)+val(umilmil) >1 then
resultado:=resultado + " mil "
else
resultado:=resultado + "";
 
procesar:="N";
if val(cmill)>0 then
resultado:=resultado + centenas[val(cmill)] + " ";
 
if val(dmill)>1 then
resultado:=resultado + decenas[val(dmill)] + " y "
else if val(dmill)=1 then
procesar:="S";
 
if procesar="S" then //quiere decir que es un numero entre 11 y 20 
(
if val(umill)>0 then
resultado:=resultado + dieces[val(umill)] + " ";
)
else
(
if val(umill)>0 then
resultado:=resultado + unidades[val(umill)] + " ";
);
 
// 
//Titulo final de millones 
// 
if val(cmill)+val(dmill)+val(umill) >1 then
resultado:=resultado + " millones "
else if val(umill) = 1 then
resultado:=resultado + " millon ";
 
procesar:="N";
if val(cmil)>0 then
resultado:=resultado + centenas[val(cmil)] + " ";
 
if val(dmil)>1 then
resultado:=resultado + decenas[val(dmil)] + " y "
else if val(dmil)=1 then
procesar:="S";
 
if procesar="S" then //quiere decir que es un numero entre 11 y 20 
(
if val(umil)>0 then
resultado:=resultado + dieces[val(umil)] + " ";
)
else
(
if val(umil)>0 then
resultado:=resultado + unidades[val(umil)] + " ";
);
 
resultado:=resultado + " mil ";
 
procesar:="N";
if val(centena)>0 then
resultado:=resultado + centenas[val(centena)] + " ";
 
if val(decena)>1 then
resultado:=resultado + decenas[val(decena)] + " y "
else if val(decena)=1 then
procesar:="S";
 
if procesar="S" then //quiere decir que es un numero entre 11 y 20 
(
if val(unidad)>0 then
resultado:=resultado + dieces[val(unidad)] + " "
)
else
(
if val(unidad)>0 then
resultado:=resultado + unidades[val(unidad)] + " ";
);
Ucase(resultado + " pesos " + right(caracter,2) + "/100 M.N.");
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por GRACIAS RAFAFLO (1 intervención) el 25/03/2011 15:24:22
ME AYUDO UN MONTO!!! LO UNICO QUE PUEDO DECIRTE ES : GRACIAS !!RAFAFLO!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por JOAO JAVIER (1 intervención) el 07/07/2009 23:41:20
Gracias me ayudo a no programar el codigo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por smca (1 intervención) el 08/11/2009 19:54:20
Hola RafaFlo, muchisimas gracias por subir este codigo, me sirvio mucho, pues llevaba bastante rato buscando una solucion para este problema y con yu ayuda fue muy facil, detecte que habia un problemita para los valores que terminaban en cero, como por ejemplo 29.560 siempre me dejaba veintinueve mil quinientos sesenta Y pesos, le hice la modificacion correspondiente y tu nuevo codigo quedo asi:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
numberVar x := tonumber({@cValorTtotal});
 
stringVar unidad :="" ;
stringVar decena :="" ;
stringVar centena :="" ;
 
stringVar umil :="" ;
stringVar dmil :="" ;
stringVar cmil :="" ;
 
stringVar umill :="" ;
stringVar dmill :="" ;
stringVar cmill :="" ;
 
stringVar umilmil :="" ;
stringVar dmilmil :="" ;
stringVar cmilmil :="" ;
 
stringVar caracter:="" ;
numberVar i :=0 ;
numberVar long :=length(totext(x)) ;
numberVar lugar :=0;
 
caracter:=totext(x);
 
i=long;
lugar:=long;
//000 123 456 789.00 
for i :=1 to long step 1 do
(
//123 decimales 456 unidades 
if i=4 then
(
unidad:=left(right(caracter,i),1);
)
else if i=5 then
(
decena:=left(right(caracter,i),1);
)
 
else if i=6 then
(
centena:=left(right(caracter,i),1);
);
 
//miles 
 
if i=8 then
(
umil:=left(right(caracter,i),1);
)
else if i=9 then
(
dmil:=left(right(caracter,i),1);
)
 
else if i=10 then
(
cmil:=left(right(caracter,i),1);
);
 
//millones 
if i=12 then
(
umill:=left(right(caracter,i),1);
)
else if i=13 then
(
dmill:=left(right(caracter,i),1);
)
 
else if i=14 then
(
cmill:=left(right(caracter,i),1);
);
 
//mil millones 
if i=16 then
(
umilmil:=left(right(caracter,i),1);
)
else if i=17 then
(
dmilmil:=left(right(caracter,i),1);
)
 
else if i=18 then
(
cmilmil:=left(right(caracter,i),1);
)
 
);
////123 456 789.00 
 
stringVar array unidades := ["un","dos","tres","cuatro","cinco","seis","siete","ocho","nueve"];
stringVar array dieces := ["once","doce","trece","catorce","quince","diez y seis","diez y siete","diez y ocho","diez y nueve"];
stringVar array decenas := ["diez","veinte","treinta","cuarenta","cincuenta","sesenta","setenta","ochenta","noventa"];
stringVar array centenas := ["ciento","doscientos","trescientos","cuatrocientos","quinientos","seiscientos","setecientos","ochocientos","novecientos"];
stringVar resultado:="";
stringVar procesar:="N";
 
//mil millones igual a los miles 
procesar:="N";
if val(cmilmil)>0 then
resultado:=resultado + centenas[val(cmilmil)] + " ";
 
if val(dmilmil)>1 then
resultado:=resultado + decenas[val(dmilmil)] + " y "
else if val(dmilmil)=1 then
procesar:="S";
 
if procesar="S" then //quiere decir que es un numero entre 11 y 20 
(
if val(umilmil)>0 then
resultado:=resultado + dieces[val(umilmil)] + " ";
)
else
(
if val(umilmil)>0 then
resultado:=resultado + unidades[val(umilmil)] + " ";
);
 
if val(cmilmil)+val(dmilmil)+val(umilmil) >1 then
resultado:=resultado + " mil "
else
resultado:=resultado + "";
 
procesar:="N";
if val(cmill)>0 then
resultado:=resultado + centenas[val(cmill)] + " ";
 
if val(dmill)>1 then
resultado:=resultado + decenas[val(dmill)] + " y "
else if val(dmill)=1 then
procesar:="S";
 
if procesar="S" then //quiere decir que es un numero entre 11 y 20 
(
if val(umill)>0 then
resultado:=resultado + dieces[val(umill)] + " ";
)
else
(
if val(umill)>0 then
resultado:=resultado + unidades[val(umill)] + " ";
);
 
// 
//Titulo final de millones 
// 
if val(cmill)+val(dmill)+val(umill) >1 then
resultado:=resultado + " millones "
else if val(umill) = 1 then
resultado:=resultado + " millon ";
 
procesar:="N";
if val(cmil)>0 then
resultado:=resultado + centenas[val(cmil)] + " ";
 
if val(dmil)>1 then
resultado:=resultado + decenas[val(dmil)] + " y "
else if val(dmil)=1 then
procesar:="S";
 
if procesar="S" then //quiere decir que es un numero entre 11 y 20 
(
if val(umil)>0 then
resultado:=resultado + dieces[val(umil)] + " ";
)
else
(
if val(umil)>0 then
resultado:=resultado + unidades[val(umil)] + " ";
);
 
resultado:=resultado + " mil ";
 
procesar:="N";
if val(centena)>0 then
resultado:=resultado + centenas[val(centena)] + " ";
 
if val(decena)>1 then
resultado:=resultado + decenas[val(decena)]
else if val(decena)=1 then
procesar:="S";
 
if procesar="S" then //quiere decir que es un numero entre 11 y 20 
(
if val(unidad)>0 then
resultado:=resultado + " y " + dieces[val(unidad)] + " "
)
else
(
if val(unidad)>0 then
resultado:=resultado + " y " + unidades[val(unidad)] + " ";
);
Ucase(resultado + " pesos ");
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por Felix (1 intervención) el 19/07/2010 23:15:52
Excelente, gracias por la solución, de crystal 8, 8.5 es bastante dificil conseguir el DLL para la conversión de numeros a letras en español.

Saludos !
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE: Numeros a Letras PRIMERA PARTE

Publicado por Pablo M. Piccone Rey (2 intervenciones) el 22/07/2010 14:01:32
Estimados, muchas gracias por el excelente aporte, yo me tomé el atrevimiento de hacerle unas modificaciones para corregir el tema de los QUINCE, ONCE, VEINTI, etc, asi como poder traducir tambien hasta 999.999.999,99. También introduje la traducción a letras los centavos.
Adjunto el código actualizado con dichas modificaciones.-
Cambiar el texto "Sum ({V.MONTO_TOTAL}, {V.RECURSO})" por el campo.-
Va en dos partes por las reglas del foro.-

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
//PRIMERA PARTE
StringVar Cadenaglobal:="";
StringVar Valor:="S";
cadenaGlobal:=ToText(Sum ({V.MONTO_TOTAL}, {V.RECURSO}));
cadenaGlobal:=Trim(cadenaGlobal);
NumberVar largo:= Length (cadenaGlobal);
cadenaGlobal:= ReplicateString ("0", 20)+cadenaGlobal;
StringVar Resultado:="";
StringVar Decimales:= Right (cadenaGlobal,2 );
StringVar Unidades:= Right (cadenaGlobal,4 );
StringVar Decenas:=Right (cadenaGlobal,5 );
StringVar Centenas:=Right(cadenaGlobal,6);
StringVar Umillar:=Right (cadenaGlobal,8 );
StringVar Dmilllar:=Right(cadenaGlobal,9);
StringVar Cmilllar:=Right(CadenaGlobal,10);
 
StringVar Umillares:=Right (cadenaGlobal,12 );
StringVar Dmilllares:=Right(cadenaGlobal,13);
StringVar Cmilllares:=Right(CadenaGlobal,14);
 
if Left(Cmilllares,1)="9" then
resultado:=resultado+"NOVECIENTOS ";
if Left(Cmilllares,1)="8" then
resultado:=resultado+"OCHOCIENTOS ";
if Left(Cmilllares,1)="7" then
resultado:=resultado+"SETECIENTOS ";
if Left(Cmilllares,1)="6" then
resultado:=resultado+"SEISCIENTOS ";
if Left(Cmilllares,1)="5" then
resultado:=resultado+"QUINIENTOS ";
if Left(Cmilllares,1)="4" then
resultado:=resultado+"CUATROCIENTOS ";
if Left(Cmilllares,1)="3" then
resultado:=resultado+"TRESCIENTOS ";
if Left(Cmilllares,1)="2" then
resultado:=resultado+"DOSCIENTOS ";
if Left(Cmilllares,1)="1" and Left(Dmilllares,1)="0" and Left(Umillares,1)="0" then
resultado:=resultado+"CIEN ";
if (Left(Cmilllares,1)="1" and Left(Dmilllares,1)<>"0") or (Left(Cmilllares,1)="1" and Left(Umillares,1)<>"0") then
resultado:=resultado+"CIENTO ";
 
if Left(Dmilllares,1)="9" then
resultado:=resultado+"NOVENTA ";
if Left(Dmilllares,1)="8" then
resultado:=resultado+"OCHENTA ";
if Left(Dmilllares,1)="7" then
resultado:=resultado+"SETENTA ";
if Left(Dmilllares,1)="6" then
resultado:=resultado+"SESENTA ";
if Left(Dmilllares,1)="5" then
resultado:=resultado+"CINCUENTA ";
if Left(Dmilllares,1)="4" then
resultado:=resultado+"CUARENTA ";
if Left(Dmilllares,1)="3" then
resultado:=resultado+"TREINTA ";
if Left(Dmilllares,1)="2" and Left(Umillares,1) = "0" then
resultado:=resultado+"VEINTE ";
if Left(Dmilllares,1)="2" and Left(Umillares,1) <> "0" then
resultado:=resultado+"VEINTI";
if Left(Dmilllares,1)="1" and Left(Umillares,1) = "0" then
resultado:=resultado+"DIEZ ";
if Left(Dmilllares,1)="1" and Left(Umillares,1) = "1" then
resultado:=resultado+"ONCE ";
if Left(Dmilllares,1)="1" and Left(Umillares,1) = "2" then
resultado:=resultado+"DOCE ";
if Left(Dmilllares,1)="1" and Left(Umillares,1) = "3" then
resultado:=resultado+"TRECE ";
if Left(Dmilllares,1)="1" and Left(Umillares,1) = "4" then
resultado:=resultado+"CATORCE ";
if Left(Dmilllares,1)="1" and Left(Umillares,1) = "5" then
resultado:=resultado+"QUINCE ";
if Left(Dmilllares,1)="1" and Left(Umillares,1) = "6" then
resultado:=resultado+"DIECISEIS ";
if Left(Dmilllares,1)="1" and Left(Umillares,1) = "7" then
resultado:=resultado+"DIECISIETE ";
if Left(Dmilllares,1)="1" and Left(Umillares,1) = "8" then
resultado:=resultado+"DIECIOCHO ";
if Left(Dmilllares,1)="1" and Left(Umillares,1) = "9" then
resultado:=resultado+"DIECINUEVE ";
 
if Left(Dmilllares,1) <> "1" and Left(Dmilllares,1) <> "2" and Left(Dmilllares,1) <> "0" and Left(Umillares,1) <> "0" then
resultado:=resultado+"Y ";
 
if Left(Umillares,1)="9" and Left(Dmilllares,1)<>"1" then
resultado:=resultado+"NUEVE ";
if Left(Umillares,1)="8" and Left(Dmilllares,1)<>"1" then
resultado:=resultado+"OCHO ";
if Left(Umillares,1)="7" and Left(Dmilllares,1)<>"1" then
resultado:=resultado+"SIETE ";
if Left(Umillares,1)="6" and Left(Dmilllares,1)<>"1" then
resultado:=resultado+"SEIS ";
if Left(Umillares,1)="5" and Left(Dmilllares,1)<>"1" then
resultado:=resultado+"CINCO ";
if Left(Umillares,1)="4" and Left(Dmilllares,1)<>"1" then
resultado:=resultado+"CUATRO ";
if Left(Umillares,1)="3" and Left(Dmilllares,1)<>"1" then
resultado:=resultado+"TRES ";
if Left(Umillares,1)="2" and Left(Dmilllares,1)<>"1" then
resultado:=resultado+"DOS ";
if Left(Umillares,1)="1" and Left(Dmilllares,1)<>"1" then
resultado:=resultado+"UN ";
 
if Sum ({V.MONTO_TOTAL}, {V.RECURSO}) >= 2000000 then
resultado:=resultado+"MILLONES ";
if Sum ({V.MONTO_TOTAL}, {V.RECURSO}) >1000000 and Sum ({V.MONTO_TOTAL}, {V.RECURSO}) < 2000000 then
resultado:=resultado+"MILLON ";
 
if Left(Cmilllar,1)="9" then
resultado:=resultado+"NOVECIENTOS ";
if Left(Cmilllar,1)="8" then
resultado:=resultado+"OCHOCIENTOS ";
if Left(Cmilllar,1)="7" then
resultado:=resultado+"SETECIENTOS ";
if Left(Cmilllar,1)="6" then
resultado:=resultado+"SEISCIENTOS ";
if Left(Cmilllar,1)="5" then
resultado:=resultado+"QUINIENTOS ";
if Left(Cmilllar,1)="4" then
resultado:=resultado+"CUATROCIENTOS ";
if Left(Cmilllar,1)="3" then
resultado:=resultado+"TRESCIENTOS ";
if Left(Cmilllar,1)="2" then
resultado:=resultado+"DOSCIENTOS ";
if Left(Cmilllar,1)="1" and Left(Dmilllar,1)="0" and Left(Umillar,1)="0" then
resultado:=resultado+"CIEN ";
if Left(Cmilllar,1)="1" and Left(Dmilllar,1)<>"0"or Left(Cmilllar,1)="1" and Left(Umillar,1)<>"0" then
resultado:=resultado+"CIENTO ";
 
if Left(Dmilllar,1)="9" then
resultado:=resultado+"NOVENTA ";
if Left(Dmilllar,1)="8" then
resultado:=resultado+"OCHENTA ";
if Left(Dmilllar,1)="7" then
resultado:=resultado+"SETENTA ";
if Left(Dmilllar,1)="6" then
resultado:=resultado+"SESENTA ";
if Left(Dmilllar,1)="5" then
resultado:=resultado+"CINCUENTA ";
if Left(Dmilllar,1)="4" then
resultado:=resultado+"CUARENTA ";
if Left(Dmilllar,1)="3" then
resultado:=resultado+"TREINTA ";
if Left(Dmilllar,1)="2" and Left(Umillar,1) = "0" then
resultado:=resultado+"VEINTE ";
if Left(Dmilllar,1)="2" and Left(Umillar,1) <> "0" then
resultado:=resultado+"VEINTI";
if Left(Dmilllar,1)="1" and Left(Umillar,1) = "0" then
resultado:=resultado+"DIEZ ";
if Left(Dmilllar,1)="1" and Left(Umillar,1) = "1" then
resultado:=resultado+"ONCE ";
if Left(Dmilllar,1)="1" and Left(Umillar,1) = "2" then
resultado:=resultado+"DOCE ";
if Left(Dmilllar,1)="1" and Left(Umillar,1) = "3" then
resultado:=resultado+"TRECE ";
if Left(Dmilllar,1)="1" and Left(Umillar,1) = "4" then
resultado:=resultado+"CATORCE ";
if Left(Dmilllar,1)="1" and Left(Umillar,1) = "5" then
resultado:=resultado+"QUINCE ";
if Left(Dmilllar,1)="1" and Left(Umillar,1) = "6" then
resultado:=resultado+"DIECISEIS ";
if Left(Dmilllar,1)="1" and Left(Umillar,1) = "7" then
resultado:=resultado+"DIECISIETE ";
if Left(Dmilllar,1)="1" and Left(Umillar,1) = "8" then
resultado:=resultado+"DIECIOCHO ";
if Left(Dmilllar,1)="1" and Left(Umillar,1) = "9" then
resultado:=resultado+"DIECINUEVE ";
 
//fin primera parte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE: Numeros a Letras SEGUNDA PARTE

Publicado por Pablo M. Piccone Rey (2 intervenciones) el 22/07/2010 14:04:25
Estimados, muchas gracias por el excelente aporte, yo me tomé el atrevimiento de hacerle unas modificaciones para corregir el tema de los QUINCE, ONCE, VEINTI, etc, asi como poder traducir tambien hasta 999.999.999,99. También introduje la traducción a letras los centavos.
Adjunto el código actualizado con dichas modificaciones.-
Cambiar el texto "Sum ({V.MONTO_TOTAL}, {V.RECURSO})" por el campo.-
Va en dos partes por las reglas del foro.-

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
//SEGUNDA PARTE
Left(Umillar,1) <> "0" then
resultado:=resultado+"Y ";
 
if Left(Umillar,1)="9" and Left(Dmilllar,1)<>"1" then
resultado:=resultado+"NUEVE ";
if Left(Umillar,1)="8" and Left(Dmilllar,1)<>"1" then
resultado:=resultado+"OCHO ";
if Left(Umillar,1)="7" and Left(Dmilllar,1)<>"1" then
resultado:=resultado+"SIETE ";
if Left(Umillar,1)="6" and Left(Dmilllar,1)<>"1" then
resultado:=resultado+"SEIS ";
if Left(Umillar,1)="5" and Left(Dmilllar,1)<>"1" then
resultado:=resultado+"CINCO ";
if Left(Umillar,1)="4" and Left(Dmilllar,1)<>"1" then
resultado:=resultado+"CUATRO ";
if Left(Umillar,1)="3" and Left(Dmilllar,1)<>"1" then
resultado:=resultado+"TRES ";
if Left(Umillar,1)="2" and Left(Dmilllar,1)<>"1" then
resultado:=resultado+"DOS ";
if Left(Umillar,1)="1" and Left(Dmilllar,1)<>"1" then
resultado:=resultado+"UN ";
 
if abs(Sum ({V.MONTO_TOTAL}, {V.RECURSO})) >= 1000 and valor <> "N"then
resultado:=resultado+"MIL "; valor:="N";
 
if Left(Centenas,1)="9" then
resultado:=resultado+"NOVECIENTOS ";
if Left(Centenas,1)="8" then
resultado:=resultado+"OCHOCIENTOS ";
if Left(Centenas,1)="7" then
resultado:=resultado+"SETECIENTOS ";
if Left(Centenas,1)="6" then
resultado:=resultado+"SEISCIENTOS ";
if Left(Centenas,1)="5" then
resultado:=resultado+"QUINIENTOS ";
if Left(Centenas,1)="4" then
resultado:=resultado+"CUATROCIENTOS ";
if Left(Centenas,1)="3" then
resultado:=resultado+"TRESCIENTOS ";
if Left(Centenas,1)="2" then
resultado:=resultado+"DOSCIENTOS ";
if Left(Centenas,1)="1" and Left(Decenas,1)="0" and Left(Unidades,1)="0" then
resultado:=resultado+"CIEN ";
if (Left(Centenas,1)="1" and Left(Decenas,1)<>"0") or (Left(Centenas,1)="1" and Left(Unidades,1)<>"0") then
resultado:=resultado+"CIENTO ";
 
if Left(decenas,1)="9" then
resultado:=resultado+"NOVENTA ";
if Left(decenas,1)="8" then
resultado:=resultado+"OCHENTA ";
if Left(decenas,1)="7" then
resultado:=resultado+"SETENTA ";
if Left(decenas,1)="6" then
resultado:=resultado+"SESENTA ";
if Left(decenas,1)="5" then
resultado:=resultado+"CINCUENTA ";
if Left(decenas,1)="4" then
resultado:=resultado+"CUARENTA ";
if Left(decenas,1)="3" then
resultado:=resultado+"TREINTA ";
if Left(decenas,1)="2" and Left(unidades,1) = "0" then
resultado:=resultado+"VEINTE ";
if Left(decenas,1)="2" and Left(unidades,1) <> "0" then
resultado:=resultado+"VEINTI";
if Left(decenas,1)="1" and Left(unidades,1) = "0" then
resultado:=resultado+"DIEZ ";
if Left(decenas,1)="1" and Left(unidades,1) = "1" then
resultado:=resultado+"ONCE ";
if Left(decenas,1)="1" and Left(unidades,1) = "2" then
resultado:=resultado+"DOCE ";
if Left(decenas,1)="1" and Left(unidades,1) = "3" then
resultado:=resultado+"TRECE ";
if Left(decenas,1)="1" and Left(unidades,1) = "4" then
resultado:=resultado+"CATORCE ";
if Left(decenas,1)="1" and Left(unidades,1) = "5" then
resultado:=resultado+"QUINCE ";
if Left(decenas,1)="1" and Left(unidades,1) = "6" then
resultado:=resultado+"DIECISEIS ";
if Left(decenas,1)="1" and Left(unidades,1) = "7" then
resultado:=resultado+"DIECISIETE ";
if Left(decenas,1)="1" and Left(unidades,1) = "8" then
resultado:=resultado+"DIECIOCHO ";
if Left(decenas,1)="1" and Left(unidades,1) = "9" then
resultado:=resultado+"DIECINUEVE ";
 
if Left(decenas,1) <> "1" and Left(decenas,1) <> "2" and Left(decenas,1) <> "0" and Left(unidades,1) <> "0" then
resultado:=resultado+"Y ";
 
if Left(Unidades,1)="9" and Left(Decenas,1)<>"1" then
resultado:=resultado+"NUEVE ";
if Left(Unidades,1)="8" and Left(Decenas,1)<>"1" then
resultado:=resultado+"OCHO ";
if Left(Unidades,1)="7" and Left(Decenas,1)<>"1" then
resultado:=resultado+"SIETE ";
if Left(Unidades,1)="6" and Left(Decenas,1)<>"1" then
resultado:=resultado+"SEIS ";
if Left(Unidades,1)="5" and Left(Decenas,1)<>"1" then
resultado:=resultado+"CINCO ";
if Left(Unidades,1)="4" and Left(Decenas,1)<>"1" then
resultado:=resultado+"CUATRO ";
if Left(Unidades,1)="3" and Left(Decenas,1)<>"1" then
resultado:=resultado+"TRES ";
if Left(Unidades,1)="2" and Left(Decenas,1)<>"1" then
resultado:=resultado+"DOS ";
if Left(Unidades,1)="1" and Left(Decenas,1)<>"1" then
resultado:=resultado+"UNO ";
 
if Left(decimales,1) <> "0" OR Right(decimales,1) <> "0" and abs(Sum ({V.MONTO_TOTAL}, {V.RECURSO})) >= 1 then
resultado:=resultado+"CON ";
 
if Left(decimales,1)="9" then
resultado:=resultado+"NOVENTA ";
if Left(decimales,1)="8" then
resultado:=resultado+"OCHENTA ";
if Left(decimales,1)="7" then
resultado:=resultado+"SETENTA ";
if Left(decimales,1)="6" then
resultado:=resultado+"SESENTA ";
if Left(decimales,1)="5" then
resultado:=resultado+"CINCUENTA ";
if Left(decimales,1)="4" then
resultado:=resultado+"CUARENTA ";
if Left(decimales,1)="3" then
resultado:=resultado+"TREINTA ";
if Left(decimales,1)="2" and Right(decimales,1) = "0" then
resultado:=resultado+"VEINTE ";
if Left(decimales,1)="2" and Right(decimales,1) <> "0" then
resultado:=resultado+"VEINTI";
if Left(decimales,1)="1" and Right(decimales,1) = "0" then
resultado:=resultado+"DIEZ ";
if Left(decimales,1)="1" and Right(decimales,1) = "1" then
resultado:=resultado+"ONCE ";
if Left(decimales,1)="1" and Right(decimales,2) = "2" then
resultado:=resultado+"DOCE ";
if Left(decimales,1)="1" and Right(decimales,1) = "3" then
resultado:=resultado+"TRECE ";
if Left(decimales,1)="1" and Right(decimales,1) = "4" then
resultado:=resultado+"CATORCE ";
if Left(decimales,1)="1" and Right(decimales,1) = "5" then
resultado:=resultado+"QUINCE ";
if Left(decimales,1)="1" and Right(decimales,1) = "6" then
resultado:=resultado+"DIECISEIS ";
if Left(decimales,1)="1" and Right(decimales,1) = "7" then
resultado:=resultado+"DIECISIETE ";
if Left(decimales,1)="1" and Right(decimales,1) = "8" then
resultado:=resultado+"DIECIOCHO ";
if Left(decimales,1)="1" and Right(decimales,1) = "9" then
resultado:=resultado+"DIECINUEVE ";
 
if Left(decimales,1) <> "1" and Left(decimales,1) <> "2" and Left(decimales,1) <> "0" and Right(decimales,1) <> "0" then
resultado:=resultado+"Y ";
 
if Right(decimales,1)="9" and Left(Decimales,1)<>"1" then
resultado:=resultado+"NUEVE ";
if Right(decimales,1)="8" and Left(Decimales,1)<>"1" then
resultado:=resultado+"OCHO ";
if Right(decimales,1)="7" and Left(Decimales,1)<>"1" then
resultado:=resultado+"SIETE ";
if Right(decimales,1)="6" and Left(Decimales,1)<>"1" then
resultado:=resultado+"SEIS ";
if Right(decimales,1)="5" and Left(Decimales,1)<>"1" then
resultado:=resultado+"CINCO ";
if Right(decimales,1)="4" and Left(Decimales,1)<>"1" then
resultado:=resultado+"CUATRO ";
if Right(decimales,1)="3" and Left(Decimales,1)<>"1" then
resultado:=resultado+"TRES ";
if Right(decimales,1)="2" and Left(Decimales,1)<>"1" then
resultado:=resultado+"DOS ";
if Right(decimales,1)="1" and Left(Decimales,1)<>"1" then
resultado:=resultado+"UN ";
 
if abs(Sum ({V.MONTO_TOTAL}, {V.RECURSO})) < 100000 and abs(Sum ({V.MONTO_TOTAL}, {V.RECURSO})) > 1000 and valor <> "N" then
resultado:=resultado+"MIL ";
 
if Left(decimales,1) <> "0" OR Right(decimales,1) <> "0" then
resultado:=resultado+"CENTAVOS";
 
'SON PESOS ' + Resultado
//fin segunda parte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE: Numeros a Letras SEGUNDA PARTE

Publicado por lUIS (1 intervención) el 13/04/2015 19:59:59
muchachos necesito q me ayuden leo y leo pero no se donde colocar la famosa función l podrán decirme donde se coloca esa función en crystal

gracias
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE: Numeros a Letras SEGUNDA PARTE

Publicado por sindy (1 intervención) el 01/10/2021 21:17:45
buen diagardezco a todos por sus aportes , pero yo soy nueva en este tema me pueden hacer el favor de explicarme como se debe utilizar este codigo agradezco mucho su ayuda
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por Sergio Fernandez (1 intervención) el 06/03/2012 21:02:40
Eres un genio! Me acabas de salvar.
Un abrazo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por Mauricio Guerra (1 intervención) el 03/03/2014 21:26:29
Bunísimo, gracias me ayudó bastante.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de Dima

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por Dima (1 intervención) el 16/02/2024 20:16:04
Hola, Gracias por tu código, me sirvió bastante...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por Hernold Cordero  (2 intervenciones) el 11/06/2009 23:50:09
Tengo el mismo problema pues necesito pasarlo a español...si alguien la tiene o sabe como conseguirla mi correo es hcordero8@hotmail,com
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por Monica (1 intervención) el 09/01/2010 16:58:37
HOLA CHICOS, TENGO EL MISMO PROBLEMA QUE USTEDES PARA PODER CONVERTIR LOS NUMEROS EN LETRAS.. SI ME FUNCIONA SOLO QUE SALE EN INGLES Y ME URGEEEEEEEEEEE EN ESPAÑOL.. TENGO AL USUARIO PRESIONANDO Y NO ENCUENTRO POR NINGUN LADO EL CRXLAT32 EN ESPAÑOL.. ME LO PODRIAN PROPORCIONAR POR FAAAVOOOORR.. GRACIAS DE ANTEMANO.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por JorgeM (1 intervención) el 02/11/2010 19:36:12
Pueden usar la dll del crystal reports 8 en español es mas facil de conseguir y si funciona.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por Francisco (1 intervención) el 08/03/2011 17:07:39
porfas pasen me la dll me interesa mucho gracias
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda ToWords(español) crxlat32 .dll

Publicado por William E (1 intervención) el 08/11/2011 18:28:51
Encontré el dll, ahora mi pregunta es donde se copia? hay que modificar el código?
Saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Ayuda ToWords(español) crxlat32 .dll

Publicado por Luis Alberto (1 intervención) el 09/02/2012 06:08:37
A ver simios maleducados !, me llevo tiempo encontrar la respuesta, pero aqui esta:
1) Busca el archivo llamado "crtowords_en.dll".
2) En esa misma carpeta hay un archivo llamado "crtowords_es.dll"
3) Elimina el archivo llamado "crtowords_en.dll" y copia y pega el archivo "crtowords_es.dll", renombra este último como "crtowords_en.dll".
Lo que vamos a hacer es que el mismo archivo "crtowords_es.dll", lo vamos a tener duplicado pero con distinto nombre.

Espero que sufran un orgasmo cuando vean que funciona, Saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Ayuda ToWords(español) crxlat32 .dll

Publicado por José David López (1 intervención) el 23/02/2012 21:35:43
Muy buen aporte me ayudó a fiinalizar mi aplicación en asp.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Ayuda ToWords(español) crxlat32 .dll

Publicado por suculomalparido (1 intervención) el 11/10/2012 21:38:01
pero para que version de crystal? porque en la 8 no encuentro esa joda
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar