Ver Mensaje Individual
  #4  
Antiguo 23-04-2004
teletranx teletranx is offline
Miembro
 
Registrado: feb 2004
Ubicación: Chile
Posts: 112
Reputación: 23
teletranx Va por buen camino
Saludos, encontre la solución, que es modificando los fuentes de fast-report )f_Class.pas)
de la siguiente manera

DecimalSeparator := Chr(Format and $FF);
case f2 of
0: Result := FormatFloat('##0.' + Dup('#', (Format div $0100) and $FF), v);
1: Result := FloatToStrF(v, ffFixed, 15, (Format div $0100) and $FF);
2: Result := FormatFloat('#,##0.' + Dup('#', (Format div $0100) and $FF), v);
3: Result := FloatToStrF(v, ffNumber, 15, (Format div $0100) and $FF);
4: Result := FormatFloat(FormatStr, v); // Aqui
end;
se cambia por lo sigyuiente
Se define
Valor : Currency;
se cambia
4: if Copy(FormatStr,1,1) = '%' then
Begin { TODO : Cambio en el Formato de Presentacion, para Nro Negativos }
Valor := v;
Result := ' ' + SysUtils.Format(FormatStr, [Valor]);
End
Else
Result := FormatFloat(FormatStr, v);

En la planilla fast-report, en formato de variables (personalizada) se coloca por ejemplo %18.0m con esto toma el número y lo cambiente a () positivo (cuando es negativo). Con esto puede usarse todo los formatos % de Delphi.

Y por Ultimo en la aplicación principal en

procedure TfMenu.FormShow(Sender: TObject);
begin
CurrencyString := '';
NegCurrFormat := 0;

end;
Saluda

Juan Carlos

Última edición por teletranx fecha: 23-04-2004 a las 00:34:44.
Responder Con Cita