Anyone ever done programming
Post Reply
Quote
Re: Anyone ever done programming
Posted by Wild Card on Tue Feb 17th at 4:13pm 2004


I took 2 years of Delphi programming at school, well, 2 classes over 2 years. And each year I surpased the class and last year, surpassed the teacher

I made a database program for cadets. It combines administration such as:

A cadets (persons) personnal information
A cadets rank and accomplishments
Attendances
Inspections
Diciplinary reports

Training which includes

what level the cadet is at
what classes he/she passed or failed
marks obtained

and Supply

what equipement/uniform parts the cadet borrowed
measurements of the cadets

...

Now that is all fine and dandy. When the program loads, you must enter your username and password. The main page has buttons for each of the above mentioned sections (Admin, trg, supply) and the program administrator has an ADMIN button to create/delete/modify users. Users are limited to certain sections of the program.

The question I have is: I have a DB_grid which displays information like last name, first name, phone number, street address. I need to put a button which will allow me to print this said list of information. Either by having it print what the DB_grid is displaying or by making it do a "print screen" and then printing it automatically.

Does anyone know how to do this?

I have searched the online help books and they dont help. My teacher dosent know how either. Heck I had to show him how to make the database

Ideas?

Thanks,
Wild Card

[addsig]




Quote
Re: Anyone ever done programming
Posted by Pegs on Tue Feb 17th at 4:36pm 2004


hmm soz i dont program.

Anyway you lost me at the start .
Not realy i sort of now what you mean by Admin etc but there is no way i could help you, soz

[addsig]




Quote
Re: Anyone ever done programming
Posted by scary_jeff on Tue Feb 17th at 4:52pm 2004


Did you try looking up 'print' on MSDN? I'm not sure, but that might only have C++ information. I'm sure crono will know, and will probably be able to say that what I said is bs in the process



Quote
Re: Anyone ever done programming
Posted by matt on Tue Feb 17th at 4:57pm 2004


I had a homework task about Pascal from computing ages ago. Never again [addsig]



Quote
Re: Anyone ever done programming
Posted by Wild Card on Tue Feb 17th at 8:22pm 2004


The only reference to "printing" I could find was this.

They define printing not as information comming out on a piece of paper but information being displayed on your screen. If you click a button, it "prints" the information on the screen for you. That dosent help much, lol

[addsig]




Quote
Re: Anyone ever done programming
Posted by Crono on Tue Feb 17th at 9:05pm 2004


Yes, in almost any programming language "print" mean send numbers to screen.

Dude, Pascal? wtf lol. Try a manly language that lets you control the memory better lol.

Anyway . . . geez, I've never used Pascal before . . . Never needed to. By the way, this database you made, is like crap I have to do for all my assignments, and we only have 2 weeks, because it's not as hard, it's just how you did it. Such as, what data structure/s did you use?

Jeff . . . you couldn't be more right lol. Actually no, here's the problem. If you developed it on a Microsoft machine, or for a Microsoft machine, you should use microsofts printer library. Because printers, believe it or not, have their own language, and the one that is ONLY reconizeable by windows (by default) is GDI I believe, it's been a while so forgive me if that's wrong. Anyway, it meant it's Windows ready ... bad part, try using it with Unix. the printer will be a bitch. You can make it work it's just harder.

So, if you're doing it for Unix, you could find a printer library. I'm not really sure, since I've never sent information to a printer before . . . I'm sure you can send it to a file and let that be printed out automatically by another function (most likely in a library somewhere).

Anyway, I'll look up some pascal stuff and see if I can't help more. . .

[EDIT]
Also, you have to remember, even though Pascal is still used (sometimes) it's a REALLY old language, we're talkin right after Fortran-punch-cards-oh-my-God-there's-this-language-which-requires-a-monitor lol, So, it might not have major support for printers of today (Obviously a dot matrix printer works completly different then a laser printer or a ink jet, and yes, if you wrote your own integration for one, you'd have to write it for all, especially if you're gonna give this to people).
[/EDIT] [addsig]




Quote
Re: Anyone ever done programming
Posted by Wild Card on Tue Feb 17th at 9:40pm 2004


Well the reason Im doing it in Pascal is because its the first language I learned and the only other one is Java which I hate, I cant do anything in it lol.

Im using standard tables for the database.. none of that SQL stuff.. I think it was paradox something like that.

And its for Windows machines.

[addsig]




Quote
Re: Anyone ever done programming
Posted by Wild Card on Tue Feb 17th at 9:41pm 2004


or maybe have it do a print screen and then print that off? [addsig]



Quote
Re: Anyone ever done programming
Posted by Crono on Tue Feb 17th at 9:53pm 2004


First of all, Java is way more powerful then Pascal, just to let you know. Not nessesarily faster at run time lol. But more Powerful.

Uh, I'm not quite sure actually, I know for a fact with Java Sun would have made a printer library (I mean they released data structure libraries pre made). . .why do you hate Java? lol

my suggestion was to write the data to a file, then send that file to a print que of somesort. Which is probably in a Windows library somewhere.

Print screen is sending stuff to the monitor, unless the library functions need you to have your stuff in the output buffer I don't suggest it, unless the person wishes to see the stuff before it's printed of course, but in that case, I'd suggest showing them the file you should be outputting to the printer, because that should be exactly what the print out will look like. So if you wanted you could add in stuff like the program name and things like that in the file. All sorts of crazy crap lol.

Again, I haven't messed with Pascal too much, so. [addsig]




Quote
Re: Anyone ever done programming
Posted by Wild Card on Tue Feb 17th at 9:59pm 2004


? posted by Crono
First of all, Java is way more powerful then Pascal, just to let you know. Not nessesarily faster at run time lol. But more Powerful.

lmao! Agreed.

? quote:

my suggestion was to write the data to a file, then send that file to a print que of somesort. Which is probably in a Windows library somewhere.

I dont understand. Is this a solution to printing? If so, how do I go abouts to doing that?

[addsig]




Quote
Re: Anyone ever done programming
Posted by Leperous on Tue Feb 17th at 10:12pm 2004


You could always use mySQL and PHP to do that




Post Reply