I've been reading documentation and other posts, but Im not able to create and save a report on the server side.
I found the next code on other post (Its from 2017)
Client side:
Code: Select all
var settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
var service = new Stimulsoft.Report.Export.StiPdfExportService();
var stream = new Stimulsoft.System.IO.MemoryStream();
service.exportTo(that.report, stream, settings);
var data = stream.toArray();
var sendToServer = JSON.stringify(data);
Code: Select all
String[] _reportS = JsonConvert.DeserializeObject<String[]>(sendToServer);
byte[] _reportB = _reportS.Select(byte.Parse).ToArray();
File.WriteAllBytes(System.Web.HttpContext.Current.Server.MapPath("~/foo.pdf"), _reportB);
It creates the Pdf, but its emty. I tried this with a report that only has one textbox with some text, thinking that may be the problem was the original report that I was using, but stil having the same problem.
I would appreciate some help
Thanks,