Произошла ошибка во время локальной обработки отчета.;Произошла непредвиденная ошибка при обработке отчета. Индекс наход ⇐ C#
Произошла ошибка во время локальной обработки отчета.;Произошла непредвиденная ошибка при обработке отчета. Индекс наход
I have one method for generate file stream, I called the method two time line by line, I am facing outside the bounds of the array, when i call it one time it works fine
public byte[] GenerateReportAsync(string reportName, string reportType, Dictionary parameters) { string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Common", "Reports", reportName); Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); Encoding.GetEncoding("utf-8"); try { //ReportViewer report = new ReportViewer(); //report.LocalReport.ReportEmbeddedResource = path; LocalReport report = new LocalReport(path); Dictionary parameters2 = new Dictionary(parameters); var result = report.Execute(GetRenderType(reportType), 1, parameters2); return result.MainStream; } catch (Exception ex) { var exception = ex.ToString(); } return null; } This is my method when i call it two time it shows error i mentioned
var getCertificateFileStream = GenerateReportAsync("CertificateWithBorder.rdlc", "pdf", parametersCertificate); var getFileStream = GenerateReportAsync("ReportWithBorder.rdlc", "pdf", reportParameter);
Источник: https://stackoverflow.com/questions/781 ... occurred-i
I have one method for generate file stream, I called the method two time line by line, I am facing outside the bounds of the array, when i call it one time it works fine
public byte[] GenerateReportAsync(string reportName, string reportType, Dictionary parameters) { string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Common", "Reports", reportName); Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); Encoding.GetEncoding("utf-8"); try { //ReportViewer report = new ReportViewer(); //report.LocalReport.ReportEmbeddedResource = path; LocalReport report = new LocalReport(path); Dictionary parameters2 = new Dictionary(parameters); var result = report.Execute(GetRenderType(reportType), 1, parameters2); return result.MainStream; } catch (Exception ex) { var exception = ex.ToString(); } return null; } This is my method when i call it two time it shows error i mentioned
var getCertificateFileStream = GenerateReportAsync("CertificateWithBorder.rdlc", "pdf", parametersCertificate); var getFileStream = GenerateReportAsync("ReportWithBorder.rdlc", "pdf", reportParameter);
Источник: https://stackoverflow.com/questions/781 ... occurred-i
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
..Базовое соединение было закрыто: при приеме произошла непредвиденная ошибка.
Anonymous » » в форуме C# - 0 Ответы
- 23 Просмотры
-
Последнее сообщение Anonymous
-