You must Sign In to post a response.
  • Category: ASP.NET Report Viewer Word Generation

    hi im binding data in Report Viewer control.Then i save PDF file as well as Excel file.Finally i save Word Doc file, but showing this Error:

    Server Error in '/' Application.

    Index was outside the bounds of the array.

    Can anybody tell Why showing this Error?
    how can i solve this Prbm?
  • #640846

    Can u share the code which u written for export..

    please use following code for export

    ExportOptions CrExportOptions;
    DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
    PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
    string strFName = Server.MapPath("");
    string contentType = null, appendHeader = null;
    CrExportOptions = crReportDocument.ExportOptions;
    CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;

    strFName += "\\export.doc";
    CrExportOptions.ExportFormatType = ExportFormatType.WordForWindows;
    CrExportOptions.FormatOptions = CrFormatTypeOptions;
    contentType = "doc";
    appendHeader = "export.doc";

    CrDiskFileDestinationOptions.DiskFileName = strFName;
    CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;

  • #640847
    No Madavi i did nt write any more code for Export option 4.0 reprot viewer have Export option(EXCEL,PDF,WORD)
    Word generation only not working

  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.