I' ve created a set of report classes. Currently I m only able to print on a selected sales account and it details. what I wanted is to print a selected range of sales account. from example the sales accountfrom is 520 and sales accountto is 900. Then the report will print the selected salesaccount into the report. Where can I add the range for my code?
// Data provider
[ //SRSReporueryAttribute(queryStr()),
SRSReportParameterAttribute(classStr(TestingSalesContract))
]
class TestingSalesDataProvider extends SRSReportDataProviderBase
{
Testing_SalesLine salesLine;
Testing_SalesHeader1 salesHeader;
Testing_SalesLineTmp salesLineTmp;
TestingSalesContract contract;
RecordInsertList recordInsertListTmpTable;
}
[SRSReportDataSetAttribute(tablestr('Testing_salesLineTmp'))]
public Testing_salesLineTmp getSalesLine()
{
;
return salesLineTmp;
}
[SysEntryPointAttribute]
public void processReport()
{
Testing_SalesAccount salesAccountFrom;
Testing_SalesAccount salesAccountTo;
;
contract = this.parmDataContract() as TestingSalesContract;
salesAccountFrom = contract.parmSalesAccountFrom();
salesAccountTo = contract.parmSalesAccountTo();
while select * from salesLine //select all dat from sales line
where salesLine.SalesAccount == salesAccountFrom // if input sales acccount was equal then showdata
{// print to tmp table
salesLineTmp.clear();
salesLineTmp.SalesAccount = salesLine.SalesAccount;
salesLineTmp.CustomerID = salesLine.CustomerID;
salesLineTmp.CustomerName = salesLine.CustomerName;
salesLineTmp.ItemID = salesLine.ItemID;
salesLineTmp.ItemName = salesLine.ItemName;
salesLineTmp.ItemPrice = salesLine.ItemPrice;
salesLineTmp.ItemQuantity = salesLine.ItemQuantity;
salesLineTmp.ItemTotal = salesLine.ItemTotal;
salesLineTmp.insert();
}
}
//UI builder
class TestingSalesUIBUilder extends SysOperationAutomaticUIBuilder
{
TestingSalesContract contract;
DialogField dialogSalesAccountFrom;
DialogField dialogSalesAccountTo;
}
public void build()
{
contract = this.dataContractObject();
dialogSalesAccountFrom = this.addDialogField(methodStr(TestingSalesContract,parmSalesAccountFrom),contract);
dialogSalesAccountTo = this.addDialogField(methodStr(TestingSalesContract,parmSalesAccountTo),contract);
}
//contract
[DataContractAttribute,
SysOperationContractProcessingAttribute(classstr(TestingSalesUIBUilder))
]
class TestingSalesContract
{
Testing_SalesAccount salesAccountFrom;
Testing_SalesAccount salesAccountTo;
}
[DataMemberAttribute('salesAccountFrom') ]
public Testing_SalesAccount parmSalesAccountFrom(str _salesAccountFrom = salesAccountFrom)
{
salesAccountFrom = _salesAccountFrom;
return salesAccountFrom;
}
[DataMemberAttribute('salesAccountTo') ]
public Testing_SalesAccount parmSalesAccountTo(str _salesAccountTo = salesAccountTo)
{
salesAccountTo = _salesAccountTo;
return salesAccountTo;
}
// controller
class TestingSalesController extends SrsReportRunController
{
}
public static void main(Args _args)
{
TestingSalesController controller;
;
controller = new TestingSalesController();
controller.parmArgs(_args);
controller.parmReportName(ssrsReportStr(TestingSales, PrecisionDesign1 ));
controller.parmDialogCaption('SalesLine');
controller.startOperation();
}
*This post is locked for comments
I have the same question (0)