[英]Can I print an SSRS Report using PrintDocument?
我有一個SSRS報告,需要使用VS 2008(C#)從Windows窗體應用程序中打印。 我想使用PrintDocument打印此報告。 反正有這樣做嗎? 這是我所擁有的:
private void Printing(string pname)
{
PrintDocument printDoc = new PrintDocument();
if (pname.Length > 0)
printDoc.PrinterSettings.PrinterName = pname;
PageSettings ps = new PageSettings();
PaperSize pz = new PaperSize();
pz.Height = 650;
pz.Width = 400;
ps.PaperSize = pz;
printDoc.DefaultPageSettings = ps;
printDoc.PrintPage += new PrintPageEventHandler(printDoc_PrintPage);
printDoc.Print();
}
private void printDoc_PrintPage(Object sender, PrintPageEventArgs e)
{
}
我只是不知道如何將報表名稱附加到PrintDocument。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.