saveDocumentToJsonString doesnt save changes from editable report
-
- Posts: 25
- Joined: Fri Nov 10, 2017 9:48 pm
saveDocumentToJsonString doesnt save changes from editable report
I seem to be having a technical problem when exporting using the following method
var jsonString = report.saveDocumentToJsonString();
I have created an editable report, and when I use that method to save the document in json string It doesn’t return the report with the edited changes, is there something I’m missing that I have to do previous to calling that method?
I am using the latest version
var jsonString = report.saveDocumentToJsonString();
I have created an editable report, and when I use that method to save the document in json string It doesn’t return the report with the edited changes, is there something I’m missing that I have to do previous to calling that method?
I am using the latest version
-
- Posts: 7289
- Joined: Tue Mar 20, 2018 5:34 am
Re: saveDocumentToJsonString doesnt save changes from editable report
Hello,
We need a sample project to reproduce the issue and provide the solution for you.
Thank you.
We need a sample project to reproduce the issue and provide the solution for you.
Thank you.
-
- Posts: 25
- Joined: Fri Nov 10, 2017 9:48 pm
Re: saveDocumentToJsonString doesnt save changes from editable report
I have attached a sample project
- Attachments
-
- SampleStimulsoft.zip
- (5.33 MiB) Downloaded 269 times
-
- Posts: 7289
- Joined: Tue Mar 20, 2018 5:34 am
Re: saveDocumentToJsonString doesnt save changes from editable report
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
function updateFormDataHazardReport() {
var report = viewer.report;
Stimulsoft.Viewer.StiEditableFieldsHelper.applyEditableFieldsToReport(report, viewer.jsObject.reportParams.editableParameters);
var updatedjsonString = report.saveDocumentToJsonString();
...
-
- Posts: 25
- Joined: Fri Nov 10, 2017 9:48 pm
-
- Posts: 25
- Joined: Fri Nov 10, 2017 9:48 pm
Re: saveDocumentToJsonString doesnt save changes from editable report
Hello, is there a method so the changes are applied to the datasource so I could read its changed values from there?
viewer.jsObject.reportParams.editableParameters <= this doesnt help me for my new venture since I don't know which field actually changed
viewer.jsObject.reportParams.editableParameters <= this doesnt help me for my new venture since I don't know which field actually changed
-
- Posts: 7289
- Joined: Tue Mar 20, 2018 5:34 am
Re: saveDocumentToJsonString doesnt save changes from editable report
Hello,
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Thank you.
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Thank you.
-
- Posts: 25
- Joined: Fri Nov 10, 2017 9:48 pm
Re: saveDocumentToJsonString doesnt save changes from editable report
So after I used this method Stimulsoft.Viewer.StiEditableFieldsHelper.applyEditableFieldsToReport(report, viewer.jsObject.reportParams.editableParameters);
I thought I could read the updated values from the DataSource, but they still have the old values
What method do I use, so that the datasource values reflect what has been modified
I thought I could read the updated values from the DataSource, but they still have the old values
What method do I use, so that the datasource values reflect what has been modified
-
- Posts: 7289
- Joined: Tue Mar 20, 2018 5:34 am
Re: saveDocumentToJsonString doesnt save changes from editable report
Hello,
Data source does not change, the only value in the editable field, in the Text component.
Thank you.
Data source does not change, the only value in the editable field, in the Text component.
Thank you.