//rapor belli bir kayıt için çağırmak istendiğinde yazılacak kod
//code block to call a report from a spesific record
//init içne yazılacak
//embed into init section
// teklif tablosunda bir kayıt için örnek
//example for a quotation record
{ smmQuotationTable callersmmQuotationTable;
QueryBuildDataSource qbds;
;
sysReportRun::getRunbaseReport(this).getLast();
if (element.args().caller())
{
if (! element.args().record().recId)
throw error(strFmt("@SYS22338",funcName()));
switch (element.args().dataset())
{ case tablenum(smmQuotationTable): callersmmQuotationTable = element.args().record(); break;
default:
throw error(strFmt("@SYS23396",funcName()));
}
}
if (callersmmQuotationTable.QuotationId)
{ qbds = element.query().dataSourceTable(tablenum(smmQuotationTable));
SysQuery::findOrCreateRange(qbds, fieldnum(smmQuotationTable,QuotationId)).value(callersmmQuotationTable.QuotationId);
}
super();
}
//code block to call a report from a spesific record
//init içne yazılacak
//embed into init section
// teklif tablosunda bir kayıt için örnek
//example for a quotation record
{ smmQuotationTable callersmmQuotationTable;
QueryBuildDataSource qbds;
;
sysReportRun::getRunbaseReport(this).getLast();
if (element.args().caller())
{
if (! element.args().record().recId)
throw error(strFmt("@SYS22338",funcName()));
switch (element.args().dataset())
{ case tablenum(smmQuotationTable): callersmmQuotationTable = element.args().record(); break;
default:
throw error(strFmt("@SYS23396",funcName()));
}
}
if (callersmmQuotationTable.QuotationId)
{ qbds = element.query().dataSourceTable(tablenum(smmQuotationTable));
SysQuery::findOrCreateRange(qbds, fieldnum(smmQuotationTable,QuotationId)).value(callersmmQuotationTable.QuotationId);
}
super();
}