I'd like to ask if there is a way to pass in exportPdf/exportHtml a list of objects (might be converted to json by Newtonsoft Json) as datasource instead of a path to saved json file?
Code: Select all
.NET Core
var objects = new List<FancyClass>() {
new FancyClass() { Name = "Test One" },
new FancyClass() { Name = "Test Two" } }
(...)
in the method then:
byte[] result = await _nodeServices.InvokeAsync<byte[]>("./node/exportPdf", reportPath, objects); <- overload with an extra parameter
Code: Select all
exportPdf file:
module.exports = function (callback, reportPath, listOfObjects) {
var dataSet = new Stimulsoft.System.Data.DataSet("Demo");
dataSet.readJsonFile("Demo.json"); <- here I'd like to do sth like dataSet.readJson(listOfObjects)/dataset.read(listOfObjects)
Cheers