Hi there
I have a json file as a datasource for a report. Unfortunately I am not able to load the report with the json datasource (don't know where to start). Is there a sample of how to create a report with a json datasource (and change the path to the json-file at runtime)? Or do I need to load the json file into an dataset / list?
Thank you for your support!
Mike
Using Json as Datasource
Re: Using Json as Datasource
Hello.
You could use the StiJsonToDataSetConverter class to load JSON from file and register the DataSet that you get.
If you need to change path to the JSON file you could use next code:
Thank you.
You could use the StiJsonToDataSetConverter class to load JSON from file and register the DataSet that you get.
Code: Select all
var ds = StiJsonToDataSetConverter.GetDataSetFromFile(@"d:\server.en.json");
report.RegData(ds);
Code: Select all
(report.Dictionary.Databases[0] as StiJsonDatabase).PathData = yourPath;
Re: Using Json as Datasource
Hi
Works perfectly!
Thank you very much!
Mike
Works perfectly!
Thank you very much!
Mike
Re: Using Json as Datasource
Hello, Mike.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.