Wrox Programmer Forums
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 19th, 2007, 04:48 PM
Registered User
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Email a report

Hello all,

I am trying to email this report as an attachment in my asp.net code. Can some one help me. I am totally lost.

This is the code so far:
 Dim oRep As ReportDocument = Nothing
    Dim reportPath As String = Server.MapPath("myreport.rpt")
    Dim ExportDirectory As ExportOptions = Nothing
    Dim htmlOpts As New HTMLFormatOptions()
    oRep = New ReportDocument
    ExportDirectory = New ExportOptions
    oRep.Load(reportPath)
    oRep.SetParameterValue("@xxxx", xxxxx)
    oRep.SetDatabaseLogon("xxxxx", "xxxxx")
    ExportDirectory = oRep.ExportOptions
    ExportDirectory.ExportFormatType = ExportFormatType.PortableDocFormat
    oRep.ExportToHttpResponse(ExportDirectory, Response, False, "Myreport")

I am able to see this as a pdf document but I am not able send it as an email attachment.

Please help....




Thank You
Kal30





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send report by email rajanikrishna Classic ASP Basics 0 October 20th, 2006 01:25 AM
Email a report only if there are records to view JuliusMoreland Reporting Services 0 July 11th, 2006 04:51 PM
Attaching a report to an email marcin2k Access VBA 2 February 8th, 2005 09:54 PM
Embed report into email message. liliarum BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 July 8th, 2004 01:27 PM
How to Email a Crystal report from .NET Alok Gupta Crystal Reports 1 September 26th, 2003 02:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.