Hi!
I am showing a report with this code (don't bother about language, it is Vulcan.NET):
LOCAL ReportDLLName AS STRING
ReportDLLName := cReportsPath+"\"+reportID+".dll"
IF !file(ReportDLLName)
ErrorBox{, "Sorry, report "+reportID+" is not yet prepared!"}:Show()
ELSE
oReport := StiReport{}
oReport := StiReport.GetReportFromAssembly(ReportDLLName, true)
oReport:RegData("Podatki", dDataSet)
oReport:Show()
ENDIF
Now, when user clicks option to send report in PDF format, I want to automatically fill email adress with predefined one, so user will not need to search between contacts or manually type in adress. How can I do this?
Regards,
Sandi
How to send a PDF of report to predefined email?
-
- Posts: 4
- Joined: Tue Dec 11, 2012 8:02 pm
Re: How to send a PDF of report to predefined email?
Hello,
You can use following code:
Thank you.
You can use following code:
Code: Select all
StiOptions.Engine.GlobalEvents.SendEMailProcess += new Stimulsoft.Report.Events.StiSendEMailEventHandler(GlobalEvents_SendEMailProcess);
void GlobalEvents_SendEMailProcess(object sender, Stimulsoft.Report.Events.StiSendEMailEventArgs e)
{
e.CallStandardHandler = false;
//Your code to send report
}
-
- Posts: 4
- Joined: Tue Dec 11, 2012 8:02 pm
Re: How to send a PDF of report to predefined email?
Thank you for an answer, but I am looking for a solution to use sending procedure, which is available in Report Viewer in toolbar. Viewer first asks for report format (PDF, ...), then creates new email with attachment. This is where I need to fill email adress.
Regards,
Sandi
Regards,
Sandi
Re: How to send a PDF of report to predefined email?
Hello,
Please try to use the following code:
Thank you.
Please try to use the following code:
Code: Select all
private void GlobalEvents_SendEMailProcess(object sender, Stimulsoft.Report.Events.StiSendEMailEventArgs e)
{
e.Recipient = "Recipient@mail.com";
}