Hello,
I use the RTF-Report to generate some Reports and it works well.
Now I want to convert these generated RTF-Reports to PDF documents with your converter wirth ShellExecute.
By starting the command the converter starts without problem, but when I define the parameters, they works not correct.
Code to create report:
Rep_RTF.ReportFile := DB_Pfad + 'Projektliste_akt.rtf';
Rep_RTF.OutputFile := Projekte_Pfad + '\Projektliste.rtf';
PListe := True;
DefVariables(Rep_RTF.Variables);
Rep_RTF.Execute([tbl_GEB_Proj]);
Code to start Converter:
Parameter := 'dir=' + Projekte_Pfad + '\' + ' file=' + Rep_RTF.OutputFile + ' out-pdf';
Result: Parameter 'dir=E:\Programmierung\Projekte\GEBUS-Objektverwaltung SQL\Projekte\ file=E:\Programmierung\Projekte\GEBUS-Objektverwaltung SQL\Projekte\Projektliste.rtf out-pdf'
ErrCode := ShellExecute(Application.Handle, 'open',
PWideChar(Prog_Pfad + 'RTF_Doc_PDF.exe'), PWideChar(Parameter), nil, SW_NORMAL);
Result Converter:
I suspect, that the 'blank' caracter in the string ist ignored in the parameter string, but this is a 'must have', because I cannot tell the users that he must write all directories without blank caracters.
With excitement I expct your solution.
Regards
Uli