Hi. I have searched heaps of threads but cannot find an answer.
I have placed the "Crystal Report Control" component on a VB5 form, and am able to display a crystal 8.5 report with just the following code.
CrystalReport.DataFiles(0) = txtDataPath
CrystalReport.ReportFileName = txtReportPath & txtReportName
CrystalReport.PrintReport
Now instead of displaying on the screen I would like to email the report (as a pdf). I note that the Crystal Report Control has some Email Properties, so I have set those as follows.
CrystalReport.EMailSubject = "Purchase Order"
CrystalReport.EMailMessage = "Attached is our Purchase Order"
CrystalReport.EMailToList = "accounts@company.co.nz"
Now how do I action? Is there an equivalant to the PrintReport (or Action=1 which also prints).
Or do I have to print to a pdf file, (which I could do by setting printer to cutepdf) and then emailing the file?
Any suggestions, please post example code. I will understand better that way.
Thanks Heaps.