This is a migrated thread and some comments may be shown as answers.

Creating and Emailing reports with Sql Server

3 Answers 38 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Todd
Top achievements
Rank 1
Todd asked on 13 May 2015, 08:05 PM

We are in the process of adapting our Winform application into a MVC Web Application and we have Telerik Reports that we use to generate Invoices and Statements which we attach to emails.

 

Ideally we would call a stored procedure while passing an Id, from there we would call the sp_send_dbmail stored procedure and pass it the file attachments and other data gathered using the Id which would make our sp call look like this:

    EXEC msdb..sp_send_DBMail
    @profile_name ='Profile'
    ,@subject = @Subject
    ,@body = @Body
    ,@recipients= @Recipients
    ,@body_format = 'HTML'
    ,@reply_to = @ReplyTo
    ,@file_attachments = 'C:\Report\Invoice 123'

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 18 May 2015, 12:07 PM
Hello Todd,

Regardless of the application type (WinForms or MVC) the reporting engine can process and render a report, which you can then save to the file system. For more information, please check the Exporting Report Programmatically help article.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Todd
Top achievements
Rank 1
answered on 18 May 2015, 12:57 PM
The link is showing how to export a report using C# or VB, I want to tell the SQL Server to send an email and then have the SQL Server generate the report.
0
Nasko
Telerik team
answered on 19 May 2015, 12:46 PM
Hello Todd,

The Report Engine should be accessed using C# or VB.NET code to call the RenderReport Method, as explained in the provided article. The SQL Server itself cannot generate the report.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Todd
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Todd
Top achievements
Rank 1
Share this question
or