//RDP Class
//class Dectration
[ SRSReportQueryAttribute (querystr(ProductInformationQry)),
SRSReportParameterAttribute(classstr(MZNARProductInformationContract))]
class MZNARProductInformation extends SRSReportDataProviderBase
{
ProductInformationTable productInformationTable;
ToDate todate;
FromDate fromdate;
}
// Temparory Table Buffer
[SRSReportDataSetAttribute(tableStr(ProductInformationTable))]
public productInformationTable getproductInformationTable ()
{
select * from productInformationTable;
return productInformationTable;
}
// inerst values method
private void inserttempmethod()
{
QueryRun queryRun = new QueryRun(this.parmQuery());
InventTable inventtable;
InventTrans inventtrans;
InventTransOrigin inventtransorigion;
while (queryRun.next())
{
inventtable = queryRun.get(tableNum(InventTable));
while select * from inventtrans
join inventtransorigion
where inventtransorigion.RecId == inventtrans.InventTransOrigin
&& inventtrans.ItemId == inventtable.ItemId
&& inventtrans.DateFinancial == mkDate(1,1,2011)
&& inventtrans.DateFinancial == mkDate(1,1,2011)
&& inventtrans.DatePhysical != dateNull()
{
productInformationTable.Name = inventtable.NameAlias;
productInformationTable.CostAmount = inventTrans.costValue();
productInformationTable.Qty = inventTrans.Qty;
productInformationTable.ItemId = inventTable.ItemId;
productInformationTable.PhysicalDate = inventTrans.DatePhysical;
productInformationTable.DateFinancial = inventTrans.DateFinancial;
productInformationTable.StatusIssue = inventTrans.StatusIssue;
// productInformationTable.ReferenceCategory = inventtransorigion.ReferenceCategory;
productInformationTable.ReferenceId = inventtransorigion.ReferenceId;
productInformationTable.StatusReceipt = inventTrans.StatusReceipt;
productInformationTable.ReferenceId = inventtransorigion.ReferenceId;
productInformationtable.insert();
}
}
}
// process report
[SysEntryPointAttribute]
public void processReport()
{
MZNARProductInformationContract productinfoContract = new MZNARProductInformationContract();
;
todate = productinfoContract.todate();
fromdate = productinfoContract.fromdate();
this.inserttempmethod();
}
// Contract Class
//class decleration
[DataContractAttribute]
public class MZNARProductInformationContract
{
ToDate DatePhysical;
FromDate DateFinancial;
}
//todate method
[
DataMemberAttribute('DatePhysical'),
SysOperationLabelAttribute(literalStr("To Date"))
]
Public ToDate todate(ToDate _datePhysical = datePhysical)
{
datePhysical = _datePhysical ;
return datePhysical;
}
//formdate method
[
DataMemberAttribute('DateFinancial'),
SysOperationLabelAttribute(literalStr("From Date"))
]
Public FromDate fromdate(FromDate _dateFinancial = dateFinancial)
{
dateFinancial = _dateFinancial ;
return dateFinancial;
}
this is my code and i want use to date and from date filter but this code does not working fine please tell me the solution of this problem.