Results 1 to 5 of 5

Thread: email

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Kolkata, India
    Posts
    290

    email

    how can i send emial of crystal repot like exporting to report

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: email

    There would be a couple of steps involved here.

    Saveing the file to disk
    Attaching it to an email message

    Are you familiar with saving a report file to disk?

    Do you have code that programmtically creates and sends an email message?

    Are you looking for one of these or both of them?

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: email

    The Crystal runtime library has the ability to Export a report into several formats and to then Email that file.

    Code:
            With objReport.ExportOptions
                .FormatType = crEFTPortableDocFormat
                .DestinationType = crEDTEMailMAPI
                .MailSubject = "Testing"
                .MailToList = "some_email_address"
                .MailMessage = "Hello World"
            End With
    
            objReport.DisplayProgressDialog = False
            objReport.Export False

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Kolkata, India
    Posts
    290

    Re: email

    Like Export Report button in Crystal Viewer . I want a button for Email Report and after the selection the report will send a attachedment to the given email id.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Kolkata, India
    Posts
    290

    Re: email

    Hi

    Email is sending properly but the report converted to .pdf is not done .It send attachment as untitled.txt instead of untitled.pdf

    Pls guide how to solve this problem..
    1. File name should be given as crystal report name
    2. Export to .PDF should be proper

    Code:
          Dim ExportOptions As New ExportOptions
            Dim EMailOptions As New MicrosoftMailDestinationOptions
            Try
                ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
                ExportOptions.ExportDestinationType = ExportDestinationType.MicrosoftMail
                EMailOptions.MailToList = txtEmailId.Text
                EMailOptions.MailSubject = "Company Detail Information"
                EMailOptions.MailMessage = "The Company Detail Information Report is Attached in PDF format"
                ExportOptions.ExportDestinationOptions = EMailOptions
                CrReport.Export(ExportOptions)
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width