I cannot hide the dialog using parmShowDialog(false);
class MyPackingListController extends SrsReportRunController
{
public static client void main(Args args)
{
//define the new object for controller class
MyPackingListController packingListController = new MyPackingListController();
//pass the caller args to the controller
packingListController.parmArgs(args);
//set the report name and report design to run
packingListController.parmReportName(ssrsReportStr(MyPackingList, Report));
//hide the report parameter dialog
packingListController.parmShowDialog(false);
//execute the report
packingListController.startOperation();
}
Also, I cannot show the record id in the ssrs report. I set the record id using preRunModifyContract() in controller and get value in processreport() in RDP class
class MyPackingListController extends SrsReportRunController
{
protected void preRunModifyContract()
{
//define object for report contract
MyPackingListContract contract;
//get the reference of the current contract object
contract = this.parmReportContract().parmRdpContract() as MyPackingListContract;
//set journal record id
if(this.parmArgs() && this.parmArgs().callerName() == "MyPackingListJour")
{
FormRun _FormRun = this.parmArgs().caller();
MyPackingListJour packingListJour = _FormRun.dataSource("MyPackingListJour").cursor();
contract.parmRecordId(packingListJour.RecId);
Info(strFmt("contract.parmRecordId() %1",contract.parmRecordId()));
}
}
}
[SRSReportParameterAttribute(classStr(MyPackingListContract))]
class MyPackingListDP extends SRSReportDataProviderBase
{
public void processReport()
{
//clear the temporary tables
packingListHeaderTmp.clear();
packingListDetailsTmp.clear();
MyPackingListContract contract = this.parmDataContract() as MyPackingListContract;
//packingListDetailsTmp.ItemId = "1111";
packingListDetailsTmp.ItemId = strFmt("%1",contract.parmRecordId());
packingListDetailsTmp.insert();
}
}
The contract is for reference.
[DataContractAttribute]
class MyPackingListContract
{
RecId recordId;
[DataMemberAttribute('RecordId')]
public recId parmRecordId(recId _recordId = recordId)
{
recordId = _recordId;
return recordId;
}
}