Click here to Skip to main content
15,888,803 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi i want to print badges contain data from 2 tables
i want when write name show the rest of data & print it
how can i do it?
thx
Posted
Comments
Yusuf 19-Mar-11 19:15pm    
such a complex question, no easy answer
- what is that you want to know?
- To fetch the data from database?
- How to get the data?
- How to format the data?
- How display the data?
- How to print the data?
Toli Cuturicu 19-Mar-11 22:04pm    
Not clear -> 1.

As Yusuf has said, your question is not very clear. I can only suggest that you search the internet using a suitable search phrase, something like c# print database, and settle down in a comfortable chair to do some reading.
 
Share this answer
 
Comments
Albin Abel 20-Mar-11 1:57am    
I combined your answer and Yusuf's comments. Thanks. My 5
As Ysuf said these are the steps involved.

1) Fetch necessary data from the database.
2) Create a new instance of the PrintDocument class. In the PrintPage Event handling use the graphic device context of the PrintDocument (say if your PrintPageEventargs variable is e then e.Graphics). Draw any graphic, text or images on this device context using the System.Drawing class methods.

3) Create instance of PrinterSettings and PageSettings classes, populate whatever settings you want then assign it to the properties of printdocument.

4) Commit print, check the results and you may need to rescale and position the graphics. A few trials may be needed.

Now as Henry Minute search internet on these steps, try yourself. If stuck anywhere post those specific question. We could able to help you.
 
Share this answer
 
Comments
Sandeep Mewara 20-Mar-11 1:43am    
Good answer. 5!
Albin Abel 20-Mar-11 1:57am    
Thanks Sandeep Mewara
thx guys but i'm beginner in c#
i'll try to clear it
i want to print page contain name & country
my problem isn't in fetch data
i just want to know how to print
i want to make this http://www.y4yy.net/images/89248045587334530998.jpg
bring the name & country from database & do this
if u can plz help me
 
Share this answer
 
v2

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