Console Applications Formatting String

  • Thread starter Thread starter Glenn Leifheit
  • Start date Start date
G

Glenn Leifheit

Hi-

I'm working on a project where i'll be querying a db and building a report to email. I am having difficulty finding a way to make this a text report that looks good. I'm hoping for something that will just allow me to send a straight text email. any thoughts on how i could do this?

Thanks

Glenn
 
The way that a string appears in an email client (or any text editor) has a lot to do with the font that is used. If you send a plain text email then the font that appears should be the default font for the email client. Different fonts have different widths and this can cause formatting plain text to be a nightmare. If your users have HTML enabled email clients I'd look into using HTML to format the report using some simple tables.

Scott

"Glenn Leifheit" <glennl at gdl.net> wrote in message Hi-

I'm working on a project where i'll be querying a db and building a report to email. I am having difficulty finding a way to make this a text report that looks good. I'm hoping for something that will just allow me to send a straight text email. any thoughts on how i could do this?

Thanks

Glenn
 
I agree with Scott, use HTML to format the text. 99% of email clients these days support HTML pages, but, what I do as a "Well, this person may be the 1%", write it out as an HTML file, and send it as an attachment. Works every time like a charm :) Using tables, no matter how the font looks, you're report will look pretty much like you want it too. I do this with a report that broke Crystal, so I know it works.
For those who are wondering, I have 2700 lines of code that make this report in HTML, and because there's not alot of "logiical" conditions that could be based off of, Crystal blew up, and a week later, I had my HTML module. Granted, it takes 10 seconds to create a report that's 5 pages long and sorts and structures upwards of a million records, but that's not too shabby in my opinion.

HTH,
Suefffel
 
Back
Top