12.12.2013, 15:58 | #1 |
Участник
|
Сортировка в Report
Всем доброго для.
Посоветуйте решение проблемы. Ах 2009, отчет CustVendFacture_RU. Хочу сделать сортировку FactureTrans_RU по ItemId. Если я правильно понимаю то нужно внести изменения в init метод DataSource. Просмотрел несколько тем, попробовал несколько способов, но результата не дало. X++: public void init() { Query q; QueryBuildDataSource qbds; super(); q = this.query(); qbds = q.dataSourceTable(tablenum(FactureJour_RU)); qbds.orderMode(OrderMode::GroupBy); qbds.addSortField(fieldnum(FactureJour_RU, FactureId)); qbds.addSortField(fieldnum(FactureJour_RU, FactureDate)); qbds.addSortField(fieldnum(FactureJour_RU, FactureDate_External)); qbds.addSortField(fieldnum(FactureJour_RU, FactureAmount)); qbds.addSortField(fieldnum(FactureJour_RU, CurrencyCode)); qbds.addSortField(fieldnum(FactureJour_RU, CustVendInvoiceAccount)); qbds.addSortField(fieldnum(FactureJour_RU, FactureExternalId)); qbds.addSortField(fieldnum(FactureJour_RU, OffSessionId)); qbds.addSortField(fieldnum(FactureJour_RU, Consignee)); qbds.addSortField(fieldnum(FactureJour_RU, Consignor)); qbds.addSortField(fieldnum(FactureJour_RU, PrintInMST)); qbds.addSortField(fieldnum(FactureJour_RU, Module)); qbds.addSortField(fieldnum(FactureJour_RU, FactureType)); qbds.addSortField(fieldnum(FactureJour_RU, DocumentNum)); qbds.addSortField(fieldnum(FactureJour_RU, DocumentDate)); qbds.addSortField(fieldnum(FactureJour_RU, DeliveryAddress)); // Only 16 sort fields per datasource are supported qbds.addSelectionField(fieldnum(FactureJour_RU, ReceiptNumber), SelectionField::Max); qbds = qbds.childDataSourceNo(1); qbds.orderMode(OrderMode::GroupBy); //qbds.sortClear(); qbds.addSortField(fieldnum(FactureTrans_RU, FactureId)); qbds.addSortField(fieldnum(FactureTrans_RU, Price)); qbds.addSortField(fieldnum(FactureTrans_RU, FactureLineType)); qbds.addSortField(fieldnum(FactureTrans_RU, Module)); qbds.addSortField(fieldnum(FactureTrans_RU, ItemName)); qbds.addSortField(fieldnum(FactureTrans_RU, Unit)); qbds.addSortField(fieldnum(FactureTrans_RU, vatValue)); qbds.addSortField(fieldnum(FactureTrans_RU, CountryRegionName)); qbds.addSortField(fieldnum(FactureTrans_RU, ItemId), SortOrder::Ascending); //qbds.sortDirection(fieldNum(FactureTrans_RU, ItemId), SortOrder::Ascending); // на этой строке падает приложение //qbds.addOrderByField(fieldnum(FactureTrans_RU, ItemId)); // Sma, 11/12/2013, Sma_CustVendFacture qbds.addSortField(fieldnum(FactureTrans_RU, InventDimId)); qbds.addSortField(fieldnum(FactureTrans_RU, InventGTDId)); qbds.addSortField(fieldnum(FactureTrans_RU, ExchRate)); qbds.addSortField(fieldnum(FactureTrans_RU, VATType)); // MCFR, BIA, 23/01/2013, !!!!!!!!!!!!!!!, qbds.addSelectionField(fieldnum(FactureTrans_RU, LineAmount), SelectionField::Sum); qbds.addSelectionField(fieldnum(FactureTrans_RU, Qty), SelectionField::Sum); qbds.addSelectionField(fieldnum(FactureTrans_RU, Excise), SelectionField::Sum); qbds.addSelectionField(fieldnum(FactureTrans_RU, vat), SelectionField::Sum); qbds.addSelectionField(fieldnum(FactureTrans_RU, TaxAmount), SelectionField::Sum); qbds.addSelectionField(fieldnum(FactureTrans_RU, LineAmountMST), SelectionField::Sum); qbds.addSelectionField(fieldnum(FactureTrans_RU, ExciseAmountMST), SelectionField::Sum); qbds.addSelectionField(fieldnum(FactureTrans_RU, vatAmountMST), SelectionField::Sum); qbds.addSelectionField(fieldnum(FactureTrans_RU, TaxAmountMST), SelectionField::Sum); } |
|
|
|