IBindingDimCombo.StoreAsString

Syntax

StoreAsString: Boolean;

StoreAsString: System.Boolean;

Description

The StoreAsString property determines whether multiple selection of dictionary elements is saved as an XML string.

Comments

Available values:

The property is used for multiple selection of dictionary elements in a regular report cell if a dictionary contains linked attributes. For correct displaying of multiple selection in a cell, the StoreAsString property saves the selection to a cube fact as a string. Multiple selection of dictionary elements is displayed in a cell using the Drop-Down Dictionary List value type.

The property value can also be set in the cell editor string as follows:

STOREASSTRING="TRUE"

Example

Executing the example requires that the repository contains a regular report with the REPORT identifier and a dictionary with the D_SEP identifier. The dictionary must contain the TERRID linked attribute.

Add links to the Metabase, Report, Tab system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    Report: IPrxReport;
    Tab: ITabSheet;
    Style: ITabCellStyle;
Begin
    
// Get current repository
    Mb := MetabaseClass.Active;
    
// Get regular report
    Report := Mb.ItemById("REPORT").Edit As IPrxReport;
    // Get cell style in the upper left corner of report
    Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
    Style := Tab.Cell(
00).Style;
    // Set cell format
    Style.Binding := "UI=""DimCombo"" SLICEDIM="""" FIXEDDIM="""" DISABLEATTRIBUTESELECT="""" 
                      ID=""D_SEP"" ATTRIBUTEVALUE=""TERRID"" STOREASSTRING=""TRUE"""
;
    
// Save changes
    (Report As IMetabaseObject).Save;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;

Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    Report: IPrxReport;
    Tab: ITabSheet;
    Style: ITabCellStyle;
Begin
    
// Get current repository
    Mb := Params.Metabase;
    
// Get regular report
    Report := Mb.ItemById["REPORT"].Edit() As IPrxReport;
    
// Get cell style in the upper left corner of report
    Tab := (Report.ActiveSheet As IPrxTable).TabSheet;
    Style := Tab.Cell[
00].Style;
    // Set cell format
    Style.Binding := 
"UI=""DimCombo"" SLICEDIM="""" FIXEDDIM="""" DISABLEATTRIBUTESELECT="""" 
                      ID=""D_SEP"" ATTRIBUTEVALUE=""TERRID"" STOREASSTRING=""TRUE"""
;
    
// Save changes
    (Report As IMetabaseObject).Save();
End Sub;

After executing the example the regular report first cell sets the drop-down list format that supports correct displaying of multiple selection of elements of the dictionary with the D_SEP identifier.

See also:

IBindingDimCombo