Move Measures to Column Area in code

edited 2:42PM in FastCube
The most confusing part of the FastCube is explaining that they have to drag fields to the area marked "Move Measure Fields Here", and explain to them why their measure fields don't then appear. It is not intuitive that the Measures list count increments without being able to see the list of fields that has already been added. Is there either a property or some way to change the Grid/Slice so that the Measure List is already part of the Column area i.e. how do I, in code, drag the Measures from the filter area to the column area?

Comments

  • edited 2:42PM
    aecspades wrote: »
    The most confusing part of the FastCube is explaining that they have to drag fields to the area marked "Move Measure Fields Here", and explain to them why their measure fields don't then appear. It is not intuitive that the Measures list count increments without being able to see the list of fields that has already been added. Is there either a property or some way to change the Grid/Slice so that the Measure List is already part of the Column area i.e. how do I, in code, drag the Measures from the filter area to the column area?

    Actually I think that I figured this out, if anybody is interested. It does seem like this should be the default behavior, but you can add an event handler like this:
      
      // Add event handler so we can move the Measures to the column area when a field is added
      slice.OnAfterAddedSliceFieldToRegion := afterSliceFieldAddedToRegion;
    

    ...and then in that event handler, you can move the Measures to the column area (and then remove the even handler so it doesn't happen again):
      if (ARegionOfField = rf_CapFacts) then
      begin
        // Move measure fields to X Axis
        slice.AddFieldTo(sMeasuresFieldName, '', rf_CapXAx);
        // Remove event handler so that this doesn't happen again
        slice.OnAfterAddedSliceFieldToRegion := nil;
      end;
    
  • edited 2:42PM
    this is very nice post

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.