How to print SSRS report to multiple numb of copies (based on user input) in pdf format

Hi Guys,

I want to to print SSRS report to multiple numb of copies (based on user input) in pdf format. I have tried but it is not working, below is my code. I came to know that I need to write this code in RDP class, can anyone help me on this.

public client static void main(Args _args)
{
CustInvoiceJour CustInvoicejour;
SONSalesInvoiceController controller = new SONSalesInvoiceController();
SRSPrintDestinationSettings printSettings;
int numofPages =0;
DataContractAttribute parmContract;
SONSalesInvoiceContract sonSalesInvoiceContract;

//controller.parmReportName(ssrsReportStr(SONSalesInvoiceSITLSSL, SalesiNvoiceReport));
controller.parmArgs(_args);
CustInvoicejour = _args.record();
controller.parmLoadFromSysLastValue(false);

controller.parmReportName(ssrsReportStr(SONSalesInvoiceSITLSSL, SITLSalesInvoiceReport));

//controller.parmShowDialog(false);
}
else if (!CustInvoicejour.SalesId)
{
controller.parmReportName(ssrsReportStr(SONSalesInvoiceSITLSSL, FreetextInvoiceReport));
//controller.parmShowDialog(true);
}
sonSalesInvoiceContract = controller.getDataContractObject(‘sonSalesInvoiceContract’);
printSettings = controller.parmReportContract().parmPrintSettings();
parmContract = controller.parmReportContract().parmRdpContract();
numofPages = sonSalesInvoiceContract.parmNumbofPages();

printSettings.printMediumType(SRSPrintMediumType::File);
printSettings.fileFormat(SRSReportFileFormat::PDF);
printSettings.numberOfCopies(numofPages);
printSettings.fileName(“SalesInvoiceReport”);
printSettings.overwriteFile(true);
printSettings.printLandscape(false);

controller.startOperation();

}