Metodo - Render

.NET

13/02/2016

Bom sabado, boa tarde, por favor, se puderem me ajudar, estou com um pequeno problema de processamento de relatorios.

O código é esse:


try
{
//Geração do metodo visualizador do Relatorio

ReportViewer reportViewer = new ReportViewer();
reportViewer.ProcessingMode = ProcessingMode.Local;

reportViewer.LocalReport.ReportEmbeddedResource = "Apresentacao.LinkReport.rdlc";

//Parametros do Relatorio

List<ReportParameter> listReportParameter = new List<ReportParameter>();

listReportParameter.Add(new ReportParameter("Nome", txtNomeCli.Text));

reportViewer.LocalReport.SetParameters(listReportParameter);

Warning[] warnings;
string[] streamids;
string mimeType;
string encoding;
string extension;


byte[] bytePDF = reportViewer.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings);

FileStream fileSteamPDF = null;

string fileName = Path.GetTempPath() + "RelatorioLiNk" + DateTime.Now.ToString("dd_MM-HH_mm_ss") + ".pdf";

fileSteamPDF = new FileStream(fileName, FileMode.Create);

fileSteamPDF.Write(bytePDF, 0, bytePDF.Length);
fileSteamPDF.Close();
Process.Start(fileName);

this.Close();
}

catch (Exception exe)
{
MessageBox.Show("Não Foi Possivel Gerar O Relatório." + " " + exe.Message, "RELATORIO NÃO GERADO", MessageBoxButtons.OK, MessageBoxIcon.Error);

}

Savio Strech

Savio Strech

Curtidas 0

Respostas

Joel Rodrigues

Joel Rodrigues

13/02/2016

E qual é o problema?
GOSTEI 0
Savio Strech

Savio Strech

13/02/2016

erro de Processamento de relatorios Local.
GOSTEI 0
Joel Rodrigues

Joel Rodrigues

13/02/2016

Certo, amigo, mas qual erro? Alguma mensagem, imagem, etc?
GOSTEI 0
Savio Strech

Savio Strech

13/02/2016

Não aparece.
GOSTEI 0
Savio Strech

Savio Strech

13/02/2016

Não aparece.
GOSTEI 0
Savio Strech

Savio Strech

13/02/2016

Joel?
GOSTEI 0
Savio Strech

Savio Strech

13/02/2016

???????????????????????????
GOSTEI 0
Savio Strech

Savio Strech

13/02/2016

Certo, amigo, mas qual erro? Alguma mensagem, imagem, etc?


Não aparece.
GOSTEI 0
Savio Strech

Savio Strech

13/02/2016

Podem encerrar.
GOSTEI 0
Savio Strech

Savio Strech

13/02/2016

Podem encerrar.
GOSTEI 0
POSTAR