返回首页

我努力在谷歌搜索,但我无法出口RDL的报告,PDF /卓越direclty.An的例外状况发生
请帮助我。

我已创建wizard.Report.rdlc
报告现在我使用代码


byte[] bytes = null;

	string strDeviceInfo = "";

	string strMimeType = "";

	string strEncoding = "";

	string strExtension = "";

	string[] strStreams = null;

	Warning[] warnings = null;

	

    try

    {

        ReportDataSource rds = new ReportDataSource("f_MANPOWERREQUISITION");

        ReportViewer rptViewer1 = new ReportViewer();

        rptViewer1.ProcessingMode = ProcessingMode.Local;

        rptViewer1.LocalReport.ReportPath = Server.MapPath("Report.rdlc");

        bytes = rptViewer1.LocalReport.Render(strFormat, strDeviceInfo, out strMimeType, out  strEncoding, out strExtension, out strStreams, out warnings);

        Response.Buffer = true;

        Response.Clear();

        Response.ContentType = strMimeType;

        Response.AddHeader("content-disposition", "attachment; filename=" + strNomFichier + "." + strFormat);

        Response.BinaryWrite(bytes); // create the file

        Response.Flush();

    }// send it to the client to download

    catch (Exception ex)

    {

    }

 

内部异常:数据源实例尚未提供的数据源\"DataSet2_f_MANPOWERREQUISITION \"。:乌玛尚卡尔帕特尔

回答

评论会员: 时间:2
s