Crystal Reports :: Export To PDF And Send In Email As Attachment
Apr 10, 2013I have a process to send report to exchange server"outlook" i want to send it as pdf format. how can i do this process??
View 1 RepliesI have a process to send report to exchange server"outlook" i want to send it as pdf format. how can i do this process??
View 1 RepliesI have the following code to convert page to pdf
Protected Sub btnExport_Click(sender As Object, e As EventArgs)
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "attachment;filename=TestPage.pdf")
[Code].....
But i want the file to save in the particular folder....
and send to an mail...
I have a small form
employeenumber ---textbox
employee name ---- textbox
employee department ---- textbox
employee sal ----- textbox
employee age ---- textbox
Now I have a webpage with search textbox
employeenumber ----- textbox (search criteria)
When user types employee number all the sql related data should fill the form containing employee name, sal, age , dept etc.
next
I have 2 buttons
excel export
automail
In excel export i have a specified format
IF IMGAE NOT DISPLAYED I HAVE CREATED MACRO
Range("A1:A2").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Selection.Merge ActiveCell.FormulaR1C1 = "LOGO" Range("A1:A2").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = True End With Range("B1:G2").Select With Selection .HorizontalAlignment = xlGeneral .VerticalAlignment = xlCenter .WrapText = False
[Code] ....
What I actually need is : when I click export button textbox data should be send to excel file and particular textbox data should be received at particular cell.
E.g:- textbox1 to send to c3 or c4
textbox 2 to send g9
when i click mail button, that data should be send to excel and automailed as attachment, i have 3 excel files with different formats, export button should view all the excel files with their respective data and mail button should send mail the excel files with data ,
1 user i excel file
2nd user 2nd excel file
3rd user 3 excel file
I want to send aspx page via email. So i converted it into pdf. The problrm is the pdf is getting created before the data is saved. So when i open the pdf my testboxes are empty. Below is the code am using. Also I want to send the pdf file as attachment.
protected void SendMail() {
var userName = "anusha-4.n-4@cognizant.com";
var toAddress = YourEmail.Text.ToString();
const string Password = "Mypassword123#";
string subject = YourSubject.Text.ToString();
[Code] .....
Actually i am working on a project i want if the user click on a applybutton
For this job automatically should send his Cv which i have it in the repeater .
Example: i have the user Personal info in 1st repeater
work Experience in 2nd repeater and education in 3rd repeater
Now I want that pdf has to generated from this repeatres and the pdf should send to specifiec email add ...
Base on the following article:
How to generate and download PDF Report from database in ASP.Net using iTextSharp C# and VB.Net
I need to generate a PDF file in a folder inside the server, and attach it for sending a mail. If again want to send mail means I want to replace the new PDF file.
View 1 RepliesI have created a rdlc report in webapplication and i want to send it through email as a pdf or a doc or image format.so what is the procedure for it.
View 1 Repliesi am using the following tutorial, URL...I would like to add in textbox's for extra email and message body for the end user to type in before the email is sent out. like the example above the email should already have the pdf automatically attached.
View 1 RepliesHere is a link with code that I used to Export data as Excel: [URL]....
That set up an ASP.Net page to allow a user to export data from a database to an Excel file.
I am exporting crystal report into html format and sending the html file via email (HTML EMAIL) in the body of text.The problem is while the receiver forwarded the email to any other person, the email content get distrubed and format of the report became tollay wrong.Also when I tried to send the report to GMAIL account, the gmail account is not displaying format properly.I report this issue in the asp.net crystal report forum perviously also.crystal report export to HTML Format issue when forwarding email to other person
View 3 RepliesIn our program, we are exporting crystal report (ExportToStream method) in html format and sendind via email body contents.
The email is showing correct format i.e same format as like format showing in crystal report viewer.
But when the user, farwarding the same email to any other person, the format is totally collapsed. All lines are moving up and text parts showing down with out proper alignment.
How to resolve this issue?
My current application send an .rtf in an attachement. I wish to send pdf instead of that.Where in my code I should modify the same?
Below is my code
RichTextBox rtbReport = new RichTextBox(); //Creating instance of Richtextbox
AppResult objResult = null; //Object of Class
frmExaminationReport objReport = new frmExaminationReport(examinationID, ProviderID, PatientID, examType); // Object of Class
AddressBookDataTable dtAddress = null;
rtbReport.Rtf = objReport.RTF; // Entire Result is assigned to Richtext box class
frmMail objMail = new frmMail(); //Object of Mail Class
string directoryPath = Application.StartupPath + "\Temp"; //Creating directory
string tempFileName = "Report_" + DateTime.Today.Year.ToString() + DateTime.Today.Month.ToString() + ".rtf"; //Generating Name
FileStream fsReport = new FileStream(directoryPath + "\" + tempFileName, FileMode.CreateNew); // FileStream
fsReport.Write(ASCIIEncoding.ASCII.GetBytes(rtbReport.Rtf), 0, rtbReport.Rtf.Length); // Writing
fsReport.Flush();
fsReport.Close();
fsReport.Dispose();
objMail.MailSubject = examType + " Report"; //Mail Subject
Let me know if any inputs needed
I would like to send an email with attachement via form, and I can`t figure it out.
My View
[Code]....
My Controller
[Code]....
I get the FileNotFoundException, it is trying to search for the file name on the local machine insted of returning the user input, something like "C:\exemple.txt" .
I also use a jQuery Ajax email form, when I submit the form via ajax the fileAttachement is always null, is there any way around it ?
My Script
[Code]....
Im generating a PDF file. Normally I send this to the user using a .ashx file, where the user can directly download it from his browser (see that code below).
Protected Function getfile() As MemoryStream
Dim stream As MemoryStream = New MemoryStream
If document.PageCount > 0 Then
document.Save(stream, False)
'Context.Response.Clear()
'Context.Response.ContentType = "application/pdf"
'Context.Response.AddHeader("Content-disposition", "attachment;filename=TicketEZ_tickets_" + eventname + ".pdf")
'Context.Response.AddHeader("content-length", stream.Length.ToString)
'Context.Response.BinaryWrite(stream.ToArray)
'Context.Response.Flush()
Return stream
stream.Close()
'Context.Response.End()
End If
But now I want to send this file as an email attachment...how can I do that? I tried this, but that doesnt work...(Value of type 'System.IO.MemoryStream' cannot be converted to 'String')
Dim att As New System.Net.Mail.Attachment(getfile)
Msg.Attachments.Add(att)
I want to give the manul expot option for export the crystal report to excel .
View 1 RepliesI want to export dataset to Excel. I did the following ways:
1) bind a dataset to a crystal report,
2) export crystal report to Excel Can it be done without displaying crystal report and only Excel file? Or, I have to find out a way export to Excel directly from dataset?
I have a strange problem with sending email via asp.net.
I adding to my email an attachment with long name ("Xxxxxxxx ąę łóxxxx yyyyyyyyyńęąąyy bbbbbbbbbb b wwwwwwwww wwwwwww ooooooooo" - polish chars included). Next I receiving that email with that file but I can't read the file. There is like damaged, with different name - ""=_utf-8_B_WHh4eHh4eHggxIXEmSDFgsOzeHh4eCB5" and the file size is a little bigger.
I want to send email with image as attachment.
It should be happen by retriving image from sql server database.
I know how to send an email. But now I want to send an email with an attachment. I also want to allow the user to browse for and then select the attachment. I cannot seem to find any info on this. All the articles I find show how to attach a file where you know the path and file name. I want the user to browse their drive, select a file, and then send an email with this attachment.
View 3 RepliesIs there a way to send the same email to multiple recipients but also send with an attachment to only 1 of them?eg. I have a form that gets filled out, the user gets a copy of the form with an attachment (file sits on server). The site owner also wants the email (through bcc) but without the attachment.
View 2 RepliesI am developing web application using csharp on visual studio 2008.I am able to generate reports, but I want just to export or generate reports in pdf only. How can I achieve this? The code I am using is below. But it is not working.
[Code]....
The code for report
[Code]....
I have completed sending attachment/pdf with email.
I have to send password protected attachment/pdf while sending email so that reciepeint should be asked to enter password while opening attachment/pdf and he will open attachment/pdf only after entering password.
I want to put email button in my detail view form when user press email button it automatically move towards login when he enter the id pass automatically form attached of that detail view all this records n form is store in my database how can i make this possibel?
View 1 RepliesMy requirement is like .... I have a text box for ToEmail address , another control is to upload "n" no of files. And a button to send those selected files ToEmail address which had entered in textbox.
View 1 Replies