I am trying to load a json string to the report:
Code: Select all
report.Load(StiNetCoreHelper.MapPath(this, "~/Content/Reports/Invoice.mrt"));
string invoice_jsondata = JsonConvert.SerializeObject(_invoiceDto);
// _invoiceDto is an instance of a class which contain a ICollection<InvoiceDetail> InvoiceDetails;
string invoice_jsondata = JsonConvert.SerializeObject(_invoiceDto);
string jsondata = Regex.Replace(invoice_jsondata, @"\t|\n|\r", "");
StiNetCoreViewer.GetReportResult(this, jsondata);
If I use this I am getting an error:
Column 'InvoiceDetails' doesnt not exist in Data Source 'root' and relation root cannot be created! It working if I have the json string in a file and load the report like that.
Can anyone tell me what I am doing wrong? Thanks a lot.