FAST CUBE DISPLAY FORMAT

edited 11:41PM in FastCube
I want to change the format of a field in Cube. I want to give me currency format PRICE = 1.100, rather than price = 1.100,00

Comments

  • edited 11:41PM
    Hi.

    Examples:

    To change format in measure:
    procedure ex_ChangeDisplayFormatOfMeasureAmount;
    var AIndex: integer;
    begin
    AIndex := fcSlice.FieldsOfRegion(rf_CapFacts).IndexOf('Measure_1');
    if AIndex >= 0 then
    begin
    fcSlice.BeginUpdate;
    fcSlice.CapFactsFieldsAbs[AIndex].VisibleInData := True;
    fcSlice.CapFactsFieldsAbs[AIndex].DisplayFormat.Kind := fkNumeric;

    fcSlice.CapFactsFieldsAbs[AIndex].DisplayFormat.FormatStr := '%2.2n';

    fcSlice.EndUpdate;
    end
    end;

    To change format in measure:
    procedure ex_ChangeDateFormatInDimentions;
    var AIndex : integer;
    begin
    AIndex := 0;
    if fcSlice.SliceFields.Find('Date', AIndex) then
    begin
    fcSlice.BeginUpdate;
    fcSlice.SliceFields[AIndex].CubeField.DisplayFormat.FormatStr := 'mmm/dd'
    fcSlice.EndUpdate;
    end;
    end;

    Also You can change default formats in TfcCube.

    Also see See compiled demo "FastCube examples".

    Oleg.

Leave a Comment