Report.Render行出现LocalProcessingException

时间:2016-02-28 23:44:34

标签: c# winforms reporting-services rdlc

在下面的代码中,它给了我一个错误,我不知道我在这里缺少什么。错误:未处理的类型' Microsoft.Reporting.WinForms.LocalProcessingException' Microsoft.ReportViewer.WinForms.dll中发生的其他信息:本地报表处理期间发生错误。这是我的代码:

  public void Export(LocalReport report)
{
    string deviceInfo =
      @"<DeviceInfo>
            <OutputFormat>EMF</OutputFormat>
            <PageWidth>8.5in</PageWidth>
            <PageHeight>11in</PageHeight>
            <MarginTop>0.25in</MarginTop>
            <MarginLeft>0.25in</MarginLeft>
            <MarginRight>0.25in</MarginRight>
            <MarginBottom>0.25in</MarginBottom>
        </DeviceInfo>";
    Microsoft.Reporting.WinForms.Warning[] warnings;
    m_streams = new List<Stream>();
    report.Render("Image", deviceInfo, CreateStream,
       out warnings);
    foreach (Stream stream in m_streams)
        stream.Position = 0;
}

0 个答案:

没有答案