如何导出啊?是将网页导成pdf吗?

解决方案 »

  1.   

    Response.Write("<script language=javascript>window.open('"+filepath+"')</script>");
      

  2.   

    DiskFileDestinationOptions diskOpts = new
    DiskFileDestinationOptions();
    //s设置导出格式
    MyReport.ExportOptions.ExportFormatType =ExportFormatType.PortableDocFormat;
    MyReport.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;

    //s设置磁盘文件选项
    diskOpts.DiskFileName = "c:\\temp\\ccc.pdf";
    MyReport.ExportOptions.DestinationOptions = diskOpts;


    MyReport.Export(); Response.ClearContent();
    Response.ClearHeaders();
    Response.ContentType="application/pdf";
    Response.WriteFile("c:\\temp\\ccc.pdf");
    Response.Flush();
    Response.Close(); System.IO.File.Delete("c:\\temp\\ccc.pdf");
      

  3.   

    客户端要装Acrobat Reader才能在页面打开吧
      

  4.   

    zhanglianyan(我编我编我编编编) 提供的方法可以打开文件,但是会弹出打开/保存的对话框,怎么样可以直接打开文件,不弹出对话框呢?