Показаны различия между двумя версиями страницы.
axapta:встроенныеотчеты [2018/04/13 22:43] |
axapta:встроенныеотчеты [2018/04/13 22:43] (текущий) |
||
---|---|---|---|
Строка 1: | Строка 1: | ||
+ | Раздел: | ||
+ | ---- | ||
+ | Axapta содержит встроенный механизм для разработки отчетов. См. [[http:// | ||
+ | |||
+ | Эта страница слудит для сбора различных сведение о штатном движке отчетов Axapta. | ||
+ | |||
+ | |||
+ | |||
+ | Класс/ | ||
+ | |||
+ | {{toc}} | ||
+ | |||
+ | === использование временных таблиц === | ||
+ | (из [[http:// | ||
+ | To use a temp table in a report, you have to make sure the report datasource points to the temp table object that actually holds the data, and you need to manipulate the fetch routine on the report to loop throught the tmpData Source the Cheque Report in Standard Axapta is a good example of this, here is a sample of a fetch routine modified to use the tmp table | ||
+ | <code xpp> | ||
+ | public boolean fetch() | ||
+ | { | ||
+ | QueryRun | ||
+ | |||
+ | localquery = new QueryRun(this); | ||
+ | tmpTableThatHoldsRecords.setTmpData(CallingClass.methodReturnsTmpRecordSet()); | ||
+ | |||
+ | if (localquery.prompt() && element.prompt()){ | ||
+ | localquery.setRecord(tmpTableThatHoldsRecords); | ||
+ | while (localquery.next()) | ||
+ | { | ||
+ | nameOfReportDatasource = localquery.getNo(1); | ||
+ | |||
+ | this.send(nameOfReportDatasource); | ||
+ | } | ||
+ | return true; | ||
+ | } | ||
+ | else | ||
+ | return false; | ||
+ | } | ||
+ | </ | ||
+ | === Запись отчета в файл из кода === | ||
+ | Вывод SalesInvoice в PDF файл [[http:// | ||
+ | <code xpp> | ||
+ | CustInvoiceJour InvJTbl; | ||
+ | SalesId Id; | ||
+ | ReportRun report; | ||
+ | RecordSortedList List = new RecordSortedList(62); | ||
+ | |||
+ | Id = " | ||
+ | |||
+ | Select InvJTbl Where InvJTbl.SalesId == Id; | ||
+ | List.ins(InvJTbl); | ||
+ | report = new ReportRun(new Args(ReportStr(SalesInvoice))); | ||
+ | report.args().caller(null); | ||
+ | report.args().parmEnum(1); | ||
+ | report.args().parmEnumType(920); | ||
+ | report.args().object(List); | ||
+ | report.args().name(" | ||
+ | report.printJobSettings().setTarget(PrintMedium:: | ||
+ | report.printJobSettings().format(PrintFormat:: | ||
+ | report.printJobSettings().fileName(" | ||
+ | report.prompt(); | ||
+ | report.run(); | ||
+ | </ | ||
+ | ---- | ||
+ | === [[: | ||
+ | *[[AxForum: | ||
+ | *[[http:// | ||