<div dir="ltr">Hi Richard,<div><br></div><div>But EmailAttachment.LoadFromFile loads a file by path.<br></div><div><br></div><div>I think, you should construct EmailAttachment with a contents of report, instead of WebFile.</div><div><br></div><div>Something like that:</div><div><br><div><div>dim rep1 as VReport</div><div>rep1 = vlProject.MakeNewReport( "CEUCertificateManu",  Session.sesWebDB.gsWConnectionStr, lsSql)</div><div>  </div><div>dim spdfData as String = rep1.PrintToBuffer(EVReportPrintType.kToPDF, 1)</div><div><br></div><div>file = new emailAttachment</div><div><b>file.Data = spdfData</b></div><div><b>file.MIMEType =  "application/pdf"</b></div><div><b>file.Name = "report.pdf"<br></b></div></div></div><div><b><br></b></div><div>--</div><div>Best regards,</div><div>Sergey Pashkov</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 31, 2014 at 8:20 PM, Richard Albrecht <span dir="ltr"><<a href="mailto:Rich@ralbrecht.net" target="_blank">Rich@ralbrecht.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>I have followed the example on the web on how to create a PDF Report and download it.</div><div><br></div><div><div>  dim rep1 as VReport</div><div>  rep1 = vlProject.MakeNewReport( "CEUCertificateManu",  Session.sesWebDB.gsWConnectionStr, lsSql)</div><div>  </div><div>  dim spdfData as String = rep1.PrintToBuffer(EVReportPrintType.kToPDF, 1)</div><div>  </div><div>  rep1.PrintToDisk( lfiSavePDF, EVReportPrintType.kToPDF)</div><div>  </div><div>  mPDF = New WebFile</div><div>  mPDF.MIMEType = "application/pdf"</div><div>  mPDF.Filename = "report.pdf"</div><div>  mPDF.ForceDownload = False</div><div>  mPDF.Data = spdfData</div><div>  </div><div>  vlProject.Close</div><div>  </div><div>  ShowURL(mPDF.URL, True)</div><div><br></div><div>mPDF is a Property of the form</div><div><br></div><div>Then in another Method:</div><div><br></div><div><div>  dim file as emailAttachment</div><div>  </div><div>  file = new emailAttachment</div><div>  file.LoadFromFile cnt1.mPDF.Download <————————-No matter what I Use I get an error.  Parameter not compatable.</div><div>  Msg.Attachments.Append file</div><div>  </div></div><div>No matter what property of mPDF I use I get an error.  </div><div><div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="word-wrap:break-word"></div></div></div></div></div><div>
<div style="color:rgb(0,0,0);font-family:Georgia;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px"><div style="margin:0px;font-size:12px;font-family:Helvetica"><br><br></div><div style="margin:0px;font-size:12px;font-family:Helvetica;min-height:14px"><span style="text-align:-webkit-auto">--</span><span style="text-align:-webkit-auto;font-family:'Brush Script MT';font-size:26px">Richard S Albrecht</span><span style="text-align:-webkit-auto">--</span></div><div style="margin:0px;font-size:12px;font-family:Helvetica">2019 Salem Rd</div><div style="margin:0px;font-size:12px;font-family:Helvetica">Elgin, IL 60123</div><div style="margin:0px;font-size:12px;font-family:Helvetica"><a href="tel:847-652-3563" value="+18476523563" target="_blank">847-652-3563</a></div><div style="margin:0px;font-size:12px;font-family:Helvetica;min-height:14px"><br></div><div style="margin:0px;font-size:12px;font-family:Helvetica">Skype: HawkCode</div><div style="margin:0px;font-size:12px;font-family:Helvetica"><br></div><div style="margin:0px;font-size:12px;font-family:Helvetica"><br></div></div><br></div><br></div><br></div><br style="color:rgb(0,0,0);font-family:Georgia;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="color:rgb(0,0,0);font-family:Georgia;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
</div>

<br></div><br>_______________________________________________<br>
Valentina mailing list<br>
<a href="mailto:Valentina@lists.macserve.net">Valentina@lists.macserve.net</a><br>
<a href="http://lists.macserve.net/mailman/listinfo/valentina" target="_blank">http://lists.macserve.net/mailman/listinfo/valentina</a><br>
<br></blockquote></div><br></div>