EX:
Step1:
class DNGRMRentalQuotationReportController extends SrsReportRunController
{
#define.ReportName('DNRentalQuotationReport.LineReport')
SalesQuotationTable salesQuotationTable ;
}
Step1:
class DNGRMRentalQuotationReportController extends SrsReportRunController
{
#define.ReportName('DNRentalQuotationReport.LineReport')
SalesQuotationTable salesQuotationTable ;
}
Step 2:
public void setRange(Args _args, Query _query)
{
QueryBuildDataSource qbds;
QueryBuildRange qbr;
if (_args && _args.dataset())
{
switch(_args.dataset())
{
case tableNum(SalesQuotationTable) :
SalesQuotationTable = _args.record();
break;
}
}
qbds = _query.dataSourceTable(tableNum(SalesQuotationTable));
qbds.clearRanges();
qbr = qbds.findRange(fieldName2id(tableNum(SalesQuotationTable),fieldStr(SalesQuotationTable, QuotationId)));
if (!qbr)
{
qbr = qbds.addRange(fieldNum(SalesQuotationTable, QuotationId));
}
if(SalesQuotationTable)
{
qbr.value(SalesQuotationTable.QuotationId);
}
}
Step 3:
public static DNGRSSalesQuotationReportController construct(Args _args)
{
DNGRSSalesQuotationReportController controller=new DNGRSSalesQuotationReportController();
controller.parmArgs(_args);
return controller;
}
Step4 :
public static void main(Args _args)
{
DNGRMRentalQuotationReportController controller = new DNGRMRentalQuotationReportController();
controller.parmReportName(#ReportName);
controller.parmArgs(_args);
controller.setRange(_args, controller.parmReportContract().parmQueryContracts().lookup(controller.getFirstQueryContractKey()));
controller.parmShowDialog(false);
controller.startOperation();
}
No comments:
Post a Comment