Bisa dilakukan custom pada class Controller.
Controller.prePromptModifyContract
disini kita akan membaca lemparan dari mana record berasal.
contoh
protected void prePromptModifyContract()
{
//add husna 20210907
RsPcmFoodingPaymentTable sectiontable;
PSMSumEXFoodingHeader depttable;
if (!contract)
{
contract = this.parmReportContract().parmRdpContract() as RS_HR_ExtraFoodingPaymReportContract;
}
//membaca lemparan parameter
if(this.parmArgs().dataset() == tableNum("PSMSumEXFoodingHeader"))
{
depttable = this.parmArgs().record();
contract.parmJournalIdDept(depttable.JournalId);
}
if(this.parmArgs().dataset() == tableNum("RsPcmFoodingPaymentTable"))
{
sectiontable = this.parmArgs().record();
contract.parmJournalId(sectiontable.JournalId);
}
//contract.parmJournalId(data.JournalId); remark by husna 20210907
super();
}
di Main method
public static void main(Args _args)
{
RS_HR_ExtraFoodingPaymReportController controller = new RS_HR_ExtraFoodingPaymReportController();
SRSPrintDestinationSettings printSettings;
;
if(_args.dataset() == tableNum("PSMSumEXFoodingHeader"))
{
controller.parmReportName(ssrsReportStr(RS_HR_ExtraFoodingPaymReport, DesignDept));
controller.parmArgs(_args);
printSettings = controller.parmReportContract().parmPrintSettings();
}
if(_args.dataset() == tableNum("RsPcmFoodingPaymentTable"))
{
controller.parmReportName(ssrsReportStr(RS_HR_ExtraFoodingPaymReport, Design));
controller.parmArgs(_args);
printSettings = controller.parmReportContract().parmPrintSettings();
}
//printSettings.printLandscape(true);
controller.parmShowDialog(false);
controller.startOperation();
}
//preRunModifyContract x++ AX2012
Tidak ada komentar:
Posting Komentar