【发布时间】:2014-05-05 18:19:35
【问题描述】:
我正在开发一个 Winforms 应用程序,按照 tutorial 使用 XML 文件制作报告。现在我需要在特定类型的打印机'BIXOLON' 和特定类型的纸张上打印它,我需要包含此信息然后执行打印。
我尝试从msdn 复制并粘贴此代码,但出现错误:
本地报告处理过程中发生错误。
在那条线上
private void Export(LocalReport report)
{
string deviceInfo =
@"<DeviceInfo>
<OutputFormat>EMF</OutputFormat>
<PageWidth>8.5in</PageWidth>
<PageHeight>11in</PageHeight>
<MarginTop>0</MarginTop>
<MarginLeft>0</MarginLeft>
<MarginRight>0</MarginRight>
<MarginBottom>0</MarginBottom>
</DeviceInfo>";
Warning[] warnings;
m_streams = new List<Stream>();
/*>>>>>*/ report.Render("Image", deviceInfo, CreateStream, out warnings);
}
我不知道如何直接打印到打印机
【问题讨论】: