Sales Invoice Header - OnAfterGetRecord()
// params like : reportname parm1 param2 param3
// use espace between params - reportname is allways the first param
params := 'facture.rpt '+ "Sales Invoice Header"."No.";
// --> execute script - do not modify
Vbs.Language := 'VBScript';
txtCR := '';
txtCR[1] := 13;
code1 := code1 + 'sub OpenFile()' + txtCR;
code1 := code1 + 'dim objShell' + txtCR;
code1 := code1 + 'Set objShell = CreateObject("Wscript.Shell")' + txtCR;
code1 := code1 + 'strArgument = "report.exe " & chr(34) & _' + txtCR;
code1 := code1 + '"'+params+'" & chr(34)' + txtCR;
code1 := code1 + 'objShell.Run strArgument' + txtCR;
code1 := code1 + 'set objShell = Nothing' + txtCR;
code1 := code1 + 'End Sub'+ txtCR;
Vbs.AddCode(code1);
Vbs.ExecuteStatement('OpenFile()'+ txtCR );
// <-- execute script - do not modify
Comments
First you have tu manually run report.exe to select the folder where your rpt is.
Send me a pm if you need more infos