Druckjob.PrintPage += new PrintPageEventHandler(Druckjob_PrintPage);
Druckpreview.Document = Druckjob;
Druckermenue.Document = Druckjob;
if (Druckermenue.ShowDialog() == DialogResult.OK)
{
Druckjob.Print();
}
Druckjob.PrintPage -= new PrintPageEventHandler(Druckjob_PrintPage);
}
voidDruckjob_PrintPage(object sender, PrintPageEventArgs e)
{
Graphics g = e.Graphics;
StringFormat lineFmtRight = new StringFormat();
lineFmtRight.Alignment = StringAlignment.Far;
g.PageUnit = GraphicsUnit.Millimeter;
Code
// Druckausgabe ...
// Drucken ..
Code
g.Dispose();
}
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Sam HobbsRank #107 · 20.5K reputationPosted Feb 18, 2010, 7:14 AM EST
0
I assume that the order is in tables in a database. First ensure that the database is in the list of databases in the Server Explorer. Then you can use the Data Sources window to create a data source.
I am sorry that I am nto sure what to do next. Look at the articles in this web site for tutorials about database programming.
Do you have a program that shows the orders in the screen? Probably you can modify that program to also print. Does that program read the orders from the database?
Sam HobbsRank #107 · 20.5K reputationPosted Feb 18, 2010, 7:14 AM EST
I am sorry that I am nto sure what to do next. Look at the articles in this web site for tutorials about database programming.
Do you have a program that shows the orders in the screen? Probably you can modify that program to also print. Does that program read the orders from the database?