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

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


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

Раздел: Программирование > СредаИсполнения > РазработкаОтчетов


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

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;
 }

Запись отчета в файл из кода

Вывод SalesInvoice в PDF файл http://dynamics-ax.blogspot.com/2006/01/writing-report-to-file-through-code.html

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();

[[:СмТакже]]

axapta/встроенныеотчеты.txt · Последнее изменение: 2018/04/13 22:43 (внешнее изменение)