Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hi all,

im developing an online train ticket. the user will key in all the journey data (e.g: ticket type, journey type, origin and destination).after the key in, all the data will be save in database when only user click print button (we have to make sure customer paid the ticket before print).

so my question is, how to save all the data into database at the same time printing tickets..lets say if customers are 5 persons.the quantity is 5 but the printer will print the ticket one by one..not 5 person include in 1 ticket.and also the serial number for the ticket.how to implement this..totally blank...

i really hope for helps.im new beginner

thanks in advance,

musiw.
Posted
Comments
Dnyaneshwar Kondbale 17-Apr-13 5:58am    
are you trying to do something?
are you write code for printing ?
musiw 17-Apr-13 6:09am    
i dont code for printing yet because i dont know how.it has to start with the storing all the key in data to db and at the same time print tickets..
Dnyaneshwar Kondbale 17-Apr-13 6:11am    
You Can try to Save data first and after the completing of this cycle in same function you can write code for printing the ticket.
musiw 17-Apr-13 6:27am    
can you show me how to code for print ticket one by one..?save data i can try to do it...but for the next thing (print) i dont understand how it operate

1 solution

This question is impossible to answer in a Quick Answers forum. It sounds as though you should be studying some more tutorials and articles on both printing and database. Go to the CodeProject articles section[^] or use Google to search for suitable training materials.
 
Share this answer
 
Comments
musiw 17-Apr-13 23:19pm    
i know how to save data to database.but this time is about printing ticket in fact using thermal printer.is it same method to print A4 paper?what about 5 people buy ticket but printer print one by one instead of 1 ticket...please someone guide me
musiw 17-Apr-13 23:23pm    
or we save the 5 people data row by row then we can print one by one?i thought the data is stored as in 1 row..because we can see the quantity and the amount collected.only the ticket just one by one
Richard MacCutchan 18-Apr-13 4:28am    
These are questions that should have been addressed during the design stages of this project, we cannot answer them for you. As for printing the tickets, printing is printing, whatever the source data and target device. You just need to code the settings for the paper size you wish to use. There are lots of articles about printing here on CodeProject.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900