Onclick Event and Multiple RunPCCommand
Posted: Wed Jul 15, 2015 4:54 am
Hi,
I am having a small problem with the script for an onclick event. I have a print button that needs to launch two Crystal reports. For whatever reason only the first RunPCCommand is executed. As a solution I can create multiple buttons to launch each report seperately but hoping that I am maybe just missing something obvious.
Please could you tell me where I am going wrong ? (Script below)
Best Regards
Brett
var command = "\\\\amasisprnsrv01\\CREXPORT\\crexport -u user -p password -f \\\\amasisprnsrv01\\crystal\\MROCRD.rpt -e print -d S06D632P -s DATALIB -a WSDOC1:"+get("PRTDOC1")+" -a WSDOC2:"+get("PRTDOC2")+" -a WSENV:"+get("PRTENV")+" -l";runPCCommand(command);
var command = "\\\\amasisprnsrv01\\CREXPORT\\crexport -u user -p password -f \\\\amasisprnsrv01\\crystal\\MROINVD.rpt -e print -d S06D632P -s DATALIB -a WSENV:"+get("PRTENV")+ "-a WSDOC1A:"+get("PRTDOC1")+" -a WSDOC2A:"+get("PRTDOC2")+" -l";runPCCommand(command);
pui.click('ENTER');
I am having a small problem with the script for an onclick event. I have a print button that needs to launch two Crystal reports. For whatever reason only the first RunPCCommand is executed. As a solution I can create multiple buttons to launch each report seperately but hoping that I am maybe just missing something obvious.
Please could you tell me where I am going wrong ? (Script below)
Best Regards
Brett
var command = "\\\\amasisprnsrv01\\CREXPORT\\crexport -u user -p password -f \\\\amasisprnsrv01\\crystal\\MROCRD.rpt -e print -d S06D632P -s DATALIB -a WSDOC1:"+get("PRTDOC1")+" -a WSDOC2:"+get("PRTDOC2")+" -a WSENV:"+get("PRTENV")+" -l";runPCCommand(command);
var command = "\\\\amasisprnsrv01\\CREXPORT\\crexport -u user -p password -f \\\\amasisprnsrv01\\crystal\\MROINVD.rpt -e print -d S06D632P -s DATALIB -a WSENV:"+get("PRTENV")+ "-a WSDOC1A:"+get("PRTDOC1")+" -a WSDOC2A:"+get("PRTDOC2")+" -l";runPCCommand(command);
pui.click('ENTER');