Results 1 to 7 of 7

Thread: How can i Print ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    How can i Print ?

    hi all,

    i developed an application. Now the reporting section is there to do. i am planning to do with notepad instead of using third party s/w like crystal. so far i use crystal. i never try notepad. how can i achieve with notepad. Suppose if some query based results, how can i manage with notepad printing.
    eg:- employee attendance sheet. i want to select employee id month , year then based on that particular employee it has to display and print.

    any help can be appreciated

    saj

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How can i Print ?

    Using text based reporting, and getting proper formatting, could be a coding headache.

    Is this a personal app or a company app?

    Do you have MS Excel available (I'm using Excel as a report engine in a couple of apps right now.)

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: How can i Print ?

    If you use Notepad, it will print in whatever way it normally does - you will have no control over it (you will only be able to use one font, will not be able to specify positions to print anything, and will not be able to draw lines or pictures etc).

    What I would recommend is using VB's Printer object, which lets you have full control. There is a good tutorial on how to use it in the "Printing" section of our Classic VB FAQs (in the FAQ forum, which is shown near the top of our home page)

    There are several other options which would be far better than Notepad, such as Hack's suggestion.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: How can i Print ?

    Quote Originally Posted by Hack
    Using text based reporting, and getting proper formatting, could be a coding headache.

    Is this a personal app or a company app?

    Do you have MS Excel available (I'm using Excel as a report engine in a couple of apps right now.)
    it is for a company.

    yes. I have the excel in the client machine. So that is good method it seems. But i dont want to edit the report by any one. without opening excel application how can i go about

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How can i Print ?

    You will need to create an Excel object in order to use Excel.

    The only way to view the spreadsheet would be to make it visible, do just don't do that.

    Once the print routine is done, just close and destroy the Excel object.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: How can i Print ?

    Quote Originally Posted by si_the_geek
    If you use Notepad, it will print in whatever way it normally does - you will have no control over it (you will only be able to use one font, will not be able to specify positions to print anything, and will not be able to draw lines or pictures etc).

    What I would recommend is using VB's Printer object, which lets you have full control. There is a good tutorial on how to use it in the "Printing" section of our Classic VB FAQs (in the FAQ forum, which is shown near the top of our home page)

    There are several other options which would be far better than Notepad, such as Hack's suggestion.
    thank u si.. i am finding alot in the link you mentioned. u r always helpful
    saj

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: How can i Print ?

    To be honest, now we know it is within a company, and the users have Excel.. I would probably change my vote to using that!

    I say probably as you don't have quite as much control over where things are printed.. but it is easier to write the code, and much easier to check how the code so far is working (as you can show your document in Excel, rather than having to actually print something out). You can also create pre-formatted template files, which you just add the data to.

    If you want to give it a go, see the Excel Tutorial link in my signature.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width