ValuesNumber: Integer;
ValuesNumber: Integer;
The ValuesNumber property determines the number of unique values available for selection.
The default value is 10000.
Executing the example requires a regular report with the RO identifier. Add links to the Metabase, Forms, Report, Tab system assemblies.
Sub UserProc;
Var
mb: IMetabase;
mObj: IMetabaseObject;
Rep: IPrxReport;
Tab: ITabSheet;
Sheet: IPrxTable;
TRange: ITabRange;
AutoFilter: ITabAutoFilter;
Begin
mb := MetabaseClass.Active;
mObj := mb.ItemById("RO").Edit;
Rep := MObj As IPrxReport;
Sheet := Rep.Sheets.Item(0) As IPrxTable;
Tab := Sheet.TabSheet;
TRange := Tab.View.Selection.Range;
AutoFilter := Tab.View.AutoFilter;
// Enable autofilter
AutoFilter.Range := TRange;
AutoFilter.Enabled := True;
tab.View.AutoFilter.Item(0).ValuesNumber := 100;
mObj.Save;
End Sub UserProc;
After executing the example the first column is filtered, the first 100 unique values will be shown.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Forms;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
mObj: IMetabaseObject;
Rep: IPrxReport;
Tab: ITabSheet;
Sheet: IPrxTable;
TRange: ITabRange;
AutoFilter: ITabAutoFilter;
Begin
mb := Params.Metabase;
mObj := mb.ItemById["RO"].Edit();
Rep := MObj As IPrxReport;
Sheet := Rep.Sheets.Item[0] As IPrxTable;
Tab := Sheet.TabSheet;
TRange := Tab.View.Selection.Range;
AutoFilter := Tab.View.AutoFilter;
// Enable autofilter
AutoFilter.Range := TRange;
AutoFilter.Enabled := True;
tab.View.AutoFilter.Item[0].ValuesNumber := 100;
mObj.Save();
End Sub;
See also: