Formatting text output

  • I would like to pull information out of my database and format it nicely. The package would then either email it or fax it.

    I can get the information into a plain text file, but would rather have it look more professional.

    Should I consider XML? That would work okay for email but what about fax?

    Any suggestions would be appreciated.

    Barb

  • Look at using Reporting Services.  This can be added onto your existing SQL Server license for no cost, and is designed to handle what you are trying to do.  I assume since you are talking about emailing or faxing the report, you want to schedule it.  With reporting services, you can design, schedule and output reports in many formats, including pdf (ideal for email attachment) and tiff (ideal for faxing).



    Mark

  • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RShowto/htm/hrs_overview_v1_46r7.asp

    Read this for more information on "Reorting services"

     


    Regards,

    Coach James

  • You can also do the following if you don't want to setup Reporting Serivces:

    1. create the "formatted" report in networkdrive/templates/reportname.xls

    2. setup a DTS job that will take transfer the file to networkdrive/final/reportname.xls

    3. Have SQL put all raw data in the "SQL" tab in the final/reportname.xls

    4. Create a "Final" tab in the final/reportname.xls that does a =VLOOKUP(A3,SQL!$A:$B,2,FALSE)

    You can also do alot more this way if desired with the VLOOKUP and template options.  This is what we used before Reporting Serives was available.  It sounds like alot of work, however the above solution can be setup in about 2 minutes once you get the hang of it.

  • Hi,

     

    I also think that the DTS package is a cool way to accomplish the pulling of data into a flat file

     

    - Vani.

  • If you have all setup for a text file, it should be easy to create a html file. Get more info about sp_makewebtask, sp_runwebtask and sp_dropwebtask procedures from BOL.

    JBF

  • Thanks for the input. I was unaware of these procedures. This will get my email looking okay.

    I plan on installing reporting services anyway but this will be a quick fix while I am learning reporting services.

    Barb

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply