Инструменты пользователя

Инструменты сайта


axapta:встроенныеотчеты

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

axapta:встроенныеотчеты [2018/04/13 22:43]
axapta:встроенныеотчеты [2018/04/13 22:43] (текущий)
Строка 1: Строка 1:
 +Раздел: [[Программирование | ]] > [[СредаИсполнения | ]] > [[РазработкаОтчетов | ]]
 +----
 +Axapta содержит встроенный механизм для разработки отчетов. См. [[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/Axapta/CRRP/Basics/CRRP_Reports_basics.asp]] из DeveloperGuide.
 +
 +Эта страница слудит для сбора различных сведение о штатном движке отчетов Axapta.
 +
 +
 +
 +Класс/RunBaseReport служит базовым классом для запуска отчетов
 +
 +{{toc}}
 +
 +=== использование временных таблиц ===
 +(из [[http://www.axaptalink.com/index.php?option=content&task=view&id=11&Itemid=30]])
 +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;
 +
 +    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;
 + }
 +</code>
 +=== Запись отчета в файл из кода ===
 +Вывод SalesInvoice в PDF файл [[http://dynamics-ax.blogspot.com/2006/01/writing-report-to-file-through-code.html]]
 +<code xpp>
 +CustInvoiceJour InvJTbl;
 +SalesId Id;
 +ReportRun report;
 +RecordSortedList List = new RecordSortedList(62);
 +
 +Id = "SO-0000123";
 +
 +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("KeepSettings");
 +report.printJobSettings().setTarget(PrintMedium::File);
 +report.printJobSettings().format(PrintFormat::PDF);
 +report.printJobSettings().fileName("C:\\Temp\\Test.pdf");
 +report.prompt();
 +report.run();
 +</code>
 +----
 +=== [[:СмТакже]] ===
 +  *[[AxForum:11656]]
 +  *[[http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?dg=microsoft.public.axapta.programming&tid=9df7b2df-117a-4eb1-967b-bc0688724b30&cat=&lang=en&cr=US&sloc=en-us&m=1&p=1]]
  
axapta/встроенныеотчеты.txt · Последнее изменение: 2018/04/13 22:43 (внешнее изменение)