#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    6
    Rep Power
    0

    Post Printing Report VB


    Can anyone recommend a way to generating and printing reports with Visual Basic. The report content is mainly data from ADO recordsets. Currently I'm writing HTML code formatted into tables and using FONT tags to chage the font but it seems a long winded way of doing things.

    I have heard of Crystal Reports but i'm looking for something a little less expensive.

    Any help would be appreciated.
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    Crystal reports and other database reporting tools like it are the only automated way to do this.
    You mention writing html code. Are you doing this in visual basic or asp?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    6
    Rep Power
    0
    I'm writing it in Visual Basic. HTML I found was the easiest way to get nicer fonts, text formatting (center justified, italics/bold/underline etc). After I generate the report (I write a .html file) I open it in the default browser on the machine and the user can use IE's or Netscapes print routines to get a hard copy. It works well but it's a pain having to write the HTML code for each report.
  6. #4
  7. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    You can always make a hidden form with no border and no background color. Then create the text or label controls dynamically according to your content and then you have vb's formatting controls to use. But this approach can be as difficult as doing html.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    6
    Rep Power
    0
    Yeah I was looking for something that can give me headers and footers as well. Not to worry ! If you hear of anything keep me in mind. Thanks again for your quick reply.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2002
    Posts
    693
    Rep Power
    26
    If you want to use html then why not use excel. Through vba you can open the html and convert it to .xls files.

    We have a lot of Crystal reports and we are trying to phase them out. The only thing that Crystal handles well are level-break reports, other than that it is crap software.
  12. #7
  13. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Posts
    123
    Rep Power
    13
    you can use MS Word - most users has it and it's easy to manipulate through automation (check it's objects in the object browser).
    Just create your report on the fly with the ADO data.

IMN logo majestic logo threadwatch logo seochat tools logo