I'm Stimulsoft's customer, version 2013 (Web). In a new company I'm testing the new version in a new project.
I'm using same code from other project, but some problems are happening.
When I call:
return StiMvcViewer.GetReportSnapshotResult(HttpContext, S);
The error: System.ArgumentNullException: Valor não pode ser nulo. Nome do parâmetro: value
I search in a forum but any solutinos are work with me.
Can you please help me?
My ActionGetReportSnapshot is:
Code: Select all
StiReport S = new Stimulsoft.Report.StiReport();
string Arquivo = Server.MapPath("~/Content/Reports/" + Session["AreaMRT"].ToString() + "/" + Session["ArquivoMRT"].ToString());
if (System.IO.File.Exists(Arquivo))
{
S.Load(Arquivo);
S.Compile();
}
int CodigoRelatorio = 0;
if (Session["CodigoRelatorioMRT"] != null)
{
CodigoRelatorio = int.Parse(Session["CodigoRelatorioMRT"].ToString());
object DadosSecundarios = null;
object Dados = RetornarDadosParaExibicaoRelatorio(CodigoRelatorio, S, false, ref DadosSecundarios);
S.RegBusinessObject("Dados", Dados);
if (DadosSecundarios != null)
S.RegBusinessObject("DadosSecundarios", DadosSecundarios);
}
var DadosRelatorio = new AppServiceFactory().ObterInstanciaRelatorioService().RetornarRelatorioPorId(CodigoRelatorio);
DadosRelatorio.FiltroRelatorio = FiltroRelatorio;
S.RegBusinessObject("Cabecalho", DadosRelatorio);
S.Dictionary.SynchronizeBusinessObjects(10);
return StiMvcViewer.GetReportSnapshotResult(HttpContext, S);
The MRT file exists correctly.
Thank you