How to set DisplayFormat in FC2

edited 6:57PM in FastCube 2
Hi,

in FastCube 1 it was possible to set the display format of measurefields this way:

fcxSlice1.CapFactsFieldsAbs[0].DisplayFormat.Kind := fkNumeric;
fcxSlice1.CapFactsFieldsAbs[0].DisplayFormat.FormatStr := '%2.2n';

What is the right way to do this in FC2?

Thanks.

Comments

  • edited 6:57PM
    Hello.

    Use fcxSlice1.MeasuresContainer.Measures[0].DisplayFormat property.

    Best regards,
    Paul Ishenin
  • edited 6:57PM
    wrote: »
    Hello.

    Use fcxSlice1.MeasuresContainer.Measures[0].DisplayFormat property.

    Best regards,
    Paul Ishenin

    Hello Paul,

    thank you for your answer.
    Sorry, but I'm still not able to solve this. In DisplayFormat there are no properties like Kind or FormatStr.
    Could you please explain more specific?

    Thanks

    Olaf
  • edited 6:57PM
    Hi.
    OlafH wrote: »
    Sorry, but I'm still not able to solve this. In DisplayFormat there are no properties like Kind or FormatStr.
    Could you please explain more specific?

    This properties in DisplayFormat.TypeFormat:
    DisplayFormat.TypeFormat.FormatStr
    DisplayFormat.TypeFormat.Kind

    Best regards,
    Oleg Pryalkov.
  • edited April 2015
    wrote:
    This properties in DisplayFormat.TypeFormat:
    DisplayFormat.TypeFormat.FormatStr
    DisplayFormat.TypeFormat.Kind

    Best regards,
    Oleg Pryalkov.
    Hi, sorry in FC 2.2.7, I set
      with fcxSlice.MeasuresContainer do begin
        i := AddCalcMeasure ('CustomA', CustomFactorDescr, af_Formula, 'CustomFactorA',
          'Result := Measures[''TotalFieldName''].CurrentValue * ' + CustomFactor.ToString);
     
        Measures[i].DisplayFormat.TypeFormat.Kind := fkCustom;
        Measures[i].DisplayFormat.TypeFormat.DecSeparator := ',';
        Measures[i].DisplayFormat.TypeFormat.FormatStr := '%2.2m';
        Measures[i].Width := CUBE_MEASURES_FIELD_WIDTH;
      end;
    

    The .Width setting works, but the DisplayFormat.TypeFormat settings have no effect. I tried fkNumeric and fkCustom. Any help would be appreciated, thank you.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.