QueryResult

Properties:

Columns

Methods:

IsEmpty
Select
Unload

Description:

Contains query result. Used to store and process obtained data.

Availability:

Server, thick client, external connection, Mobile application (server).
Exchange with server is possible. Serializable.

Example:

// report form contains Spreadsheet control
// report template contains "String" named area,
// which consits od cells with parameters: 
// Nomenclateur BegBalance Receipt Expense EndBalance
// The Nomenclature cell has Details details parameter  
// DetailsUse property is set to String.

// Output report header
...
//query text
... // query text is not given in this example
...
QueryResult = Query.Execute();
Spreadsheet.StartRowAutoGrouping();
SumSelection = 
    QueryResult.Choose(QueryResultIteration.ByGroups);
SumSelection.Next();
Selection = SumSelection.Choose(QueryResultIteration.Linear);
While 
Selection.Next() Do
    Area = Template.GetArea("String");
    // filling report line parameters
    Area.Parameters.Nomenclature = 
        Selection.NomenclatureImage;
    Area.Parameters.Details = Selection.Nomenclature;
    Area.Parameters.BegBalance = Selection.BegBalance;
    Area.Parameters.Receipt = Selection.Receipt;
    Area.Parameters.Expense = Selection.Expense;
    Area.Parameters.EndBalance = Selection.EndBalance;
    Spreadsheet.Put(Area, Selection.Level());
EndDo
;
Spreadsheet.EndRowAutoGrouping();

// and then the footer is outputted

See also:

PivotTable, property DataSource
Query, method Execute
ReportBuilder, property Result
QueryBuilder, property Result
QueryResultSelection, method Owner

    

1C:Enterprise Developer's Community