Start LocalWebServer with sampleData
is there a option to start the webserver (LocalReporting().AsWebServer()) with some own sampleData?
I have some data and i want to supply the webserver with some defaultdata to design with.
Do you persist your templates on the file system?
Like in this example?
Then you can provide your sample data using jsreport studio, save it, and it will be there for all the time.
I want to start the jsreport studio with some sampleData from the backend.
The user should not need to save the data with the studio.
The data should be there from beginning.
What I wrote is still valid.
You start the studio on your own first and prepare sample data.
The users will see the same since then.
You could also create it on the file system by hand, but it is easier to do it through the studio so you don't have to know the exact format.
What if the sampleData is dynamic?
I could create a file with this dynamic data and move it to the right directory but there is the problem with the .config file because the studio doesnt recognize the datafile.
If it is dynamic, you could use jsreport API to create the entity after the server starts up.
The best is typically to open studio in a browser and check the network in F12 tools to see how the request for creating entity looks like.