Informes base -> en la generación de los sumarios se aplica el formato que tenga la columna de ese sumario (en vez de comprobar los tipos)
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@304 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
d1cc146bae
commit
ab106540f3
@ -88,6 +88,7 @@ inherited frViewSumarios: TfrViewSumarios
|
||||
object cxStyleRepository1: TcxStyleRepository
|
||||
Left = 216
|
||||
Top = 104
|
||||
PixelsPerInch = 96
|
||||
object cxStyleNombreColumna: TcxStyle
|
||||
AssignedValues = [svColor, svTextColor]
|
||||
Color = clWindow
|
||||
|
||||
@ -104,27 +104,25 @@ end;
|
||||
procedure TfrViewSumarios.AplicarSumarioVista (
|
||||
const APosition: TcxSummaryPosition; const AColumnCaption: String;
|
||||
const AKind: TcxSummaryKind);
|
||||
const
|
||||
MASK_MONEDA = ',0.## €;-,0.## €';
|
||||
MASK_NUMERO = '#,##0';
|
||||
var
|
||||
AColumn : TcxGridDBColumn;
|
||||
ADisplayFormat : string;
|
||||
begin
|
||||
AColumn := ViewInformeBaseGrid.GetColumnByCaption(AColumnCaption);
|
||||
|
||||
if (AColumn.Properties is TcxCustomTextEditProperties) then
|
||||
ADisplayFormat := TcxCustomTextEditProperties(AColumn.Properties).DisplayFormat
|
||||
else
|
||||
ADisplayFormat := '';
|
||||
|
||||
if APosition = spFooter then
|
||||
begin
|
||||
AColumn.Summary.FooterKind := AKind;
|
||||
if (AKind in [skSum, skAverage]) and (AColumn.PropertiesClassName = 'TcxCurrencyEditProperties') then
|
||||
AColumn.Summary.FooterFormat := MASK_MONEDA
|
||||
else
|
||||
AColumn.Summary.FooterFormat := MASK_NUMERO;
|
||||
//AColumn.Summary.FooterFormat := ADisplayFormat;
|
||||
end
|
||||
else begin
|
||||
AColumn.Summary.GroupFooterKind := AKind;
|
||||
if (AKind in [skSum, skAverage]) and (AColumn.PropertiesClassName = 'TcxCurrencyEditProperties') then
|
||||
AColumn.Summary.GroupFooterFormat := MASK_MONEDA
|
||||
else
|
||||
AColumn.Summary.GroupFooterFormat := MASK_NUMERO;
|
||||
// AColumn.Summary.GroupFooterFormat := ADisplayFormat;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user