Hello everybody,
I want to export to an .rpt file a specific sales order taken from DocNum or DocEntry code. Later I want to convert .rpt file to .pdf file and send it via email. I have found many solutions on converting .rpt to .pdf and send .pdf via email but I can not create the .rpt file from my UI/DI API.
I read the solution given in this thread but on second line of code I get an exception
Unable to cast COM object of type 'System.__ComObject' to interface type 'SAPbobsCOM.ReportParams'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{0B4E873F-65FD-4638-9339-84D197CF8109}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
The problem is even if I did not get above exception I don't see a way in this particular solution a way to create a .rpt file with a specidic Sales Order DocEntry or DocNum.
Any help is much appreciated.
Edit:
Is there at least a way to Export "Preview" of current Sales Order form? Menu UID of Preview is 519 but choosing it will only open Preview form with out an option to export it to a pdf file
Kind Regards,
Dimitris