Evening,
I`ve been struggling with a problem. I need to launch a SSRS report from a form. For this reason I`m using a Controller class, a Data Contract class and a Data Provider Class. Controller class simply gets Args from caller and sets parameters in Data Contract class. That works fine. The tricky part is that I cant get the parameter from Data Contract to Data provider class. Inside the Data Provider class I have an object of the Data Contract, but when I try to get the parameter, it returns me an empty value.
I present you the code snippets, so that the view could be clearer.
Controller class:
class SalesPackageListController extends SrsReportRunController { } public static client void main(Args args) { SalesPackageListController controller = new SalesPackageListController(); controller.parmReportName(ssrsReportStr(PackageListReport, PackageListLT)); controller.parmArgs(args); controller.startOperation(); } protected void prePromptModifyContract() { CustPackingSlipJour CustPackingSlipJour; SalesPackageListDataContract contract; ; CustPackingSlipJour = this.parmArgs().record(); contract = this.parmReportContract().parmRdpContract() as SalesPackageListDataContract; contract.parmSalesId(CustPackingSlipJour.SalesId); }
Data Contract class:
[DataContractAttribute] public class SalesPackageListDataContract { SalesId SalesId; } [DataMemberAttribute("SalesId")] public SalesId parmSalesId(SalesId _salesId = SalesId) { ; SalesId = _salesId; return SalesId; }
Data Provider class:
[SRSReportParameterAttribute(classstr(SalesPackageListDataContract))] public class SalesPackageListDP extends SRSReportDataProviderBase { SalesPackageListHeaderFooterTmp SalesPackageListHeaderFooterTmp; SalesPackageListDetailsTmp SalesPackageListDetailsTmp; } public void processReport() { SalesPackageListDataContract SalesPackageListDataContract; CustPackingSlipTrans CustPackingSlipTrans; SalesId salesId; ; SalesPackageListDataContract = this.parmDataContract(); salesId = SalesPackageListDataContract.parmSalesId(); while select * from CustPackingSlipTrans where CustPackingSlipTrans.SalesId == salesId { SalesPackageListDetailsTmp.clear(); SalesPackageListDetailsTmp.SalesId = CustPackingSlipTrans.SalesId; SalesPackageListDetailsTmp.ItemId = CustPackingSlipTrans.ItemId; SalesPackageListDetailsTmp.insert(); } }
So, I cant get the salesId variable in Data Provider`s method processReport. Any suggestions what could be wrong?
*This post is locked for comments