-
Jun 2nd, 2008, 05:56 AM
#1
Thread Starter
Hyperactive Member
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
-
Jun 2nd, 2008, 05:58 AM
#2
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.)
-
Jun 2nd, 2008, 06:00 AM
#3
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.
-
Jun 2nd, 2008, 06:49 AM
#4
Thread Starter
Hyperactive Member
Re: How can i Print ?
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
-
Jun 2nd, 2008, 06:50 AM
#5
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.
-
Jun 2nd, 2008, 07:53 AM
#6
Thread Starter
Hyperactive Member
Re: How can i Print ?
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
-
Jun 2nd, 2008, 07:58 AM
#7
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|