开发者

Using SQL Query to create and e-mail a Report

I am new to C# and still have a lot to learn. My lecturer thought I would be a great exercise to trough me into the deep end and give me this exercise to do:

Write a C# Windows application that uses a SQL query string to generate a report; you must then be able to e-mail this report to 5 different e-mail addresses. This application has to be compatible with any SQL database.

This is the only information I have (I can ask my lecturer for more information, but it would be nice to figure it out on my own – or let her think I figured it out on my own).

Can anyone please maybe give me some pointers on how to start and 开发者_C百科what will the best Report format be for an application like this?

I am completely lost; help will be very much appreciated.

Thanks in advance!

EDIT: I really don't know, but from the whole "compatible with any SQL database" tells me that maybe the application must open on where you could input your database information, to make a connection to the/any database, and then going to a new screen where you can input the query, then the application must write the report (it would be nice to actually see the report before you e-mail it), I think you have to be able to e-mail the report from within the application.

Hope this make sense, is something like this possible?


I you have to mail the report .PDF will be the best option. You can use the ItextSharp to generate the PDF report after retrieving the rows from the database.

And then mail the PDF to the whomever you want.

You can easily get the Itextsharp dll from http://sourceforge.net/projects/itextsharp/

Documentation for this is also easily available.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜