The old GetReportData method is gone and now we can create and access StiReport (thank you), but I cant figure out which methods to register data into my reports. I tried the following:
Code: Select all
var StiReport = new StiReport();
#region Layout
var relatorio = _repositorio.ObterLayout(formulario, sequencia);
StiReport.LoadFromJson(relatorio); //This loads my .mrt file, and is working as Intended
#endregion
StiDataCollection collection = new StiDataCollection();
#region Carrega Ambiente
var Ambiente = _ambienteRelatorio.ObterAmbienteRelatorio(empresaId: 1);
StiData _ambiente = new StiData("Ambiente", Ambiente); //Ambiente is a JSON object
collection.Add(_ambiente);
#endregion
StiReport.RegData(collection);
return StiNetCoreViewer.GetReportResult(this, StiReport);
I attached some sample data, but im not loading using a file. My objective is to load this data directly into the report, as shown in the code.