请告诉我为什么会出现这些错误,但是在上层回发代码中,当导出异常时,它会显示参数值:
var _exportOptions = _reportDocument.ExportOptions;
_diskFileDestinationOptions.DiskFileName = obj.File_Storage_Path;
_exportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
_exportOptions.ExportFormatType = exportFormat;
_exportOptions.ExportDestinationOptions = _diskFileDestinationOptions;
_exportOptions.ExportFormatOptions = _reportFormatOptions;
// _exportOptions.SetParameterValue("Parameter1", Convert.ToString(Session["myname"]));
_reportDocument.Export();
fileToOpen = obj.File_To_Open;
// filePath = obj.File_Storage_Path;
}
catch (Exception ex)
{
throw new Exception("Error as " + ex.Message);
}
finally
{
_reportDocument.Close();
}
return fileToOpen;