Page 1 of 1
GetReportSnapshot HttpPost
Posted: Mon Feb 08, 2016 10:05 am
by Michail
Good day.
How I can send data (from <form>) by post to method GetReportSnapshot?
I use Session, but it's bad practice
User can generate two reports in one moment and session will be overwritten. I can generate some uid (for unique key for session) and pass this to view, but it's also bad practice

Re: GetReportSnapshot HttpPost
Posted: Tue Feb 09, 2016 11:15 am
by HighAley
Hello.
Could you specify which our viewer you use?
Thank you.
Re: GetReportSnapshot HttpPost
Posted: Wed Feb 10, 2016 7:36 am
by Michail
Hello.
StiMvcViewer
Re: GetReportSnapshot HttpPost
Posted: Wed Feb 10, 2016 1:02 pm
by HighAley
Hello.
Please, set next property:
Then you could use next helping method:
Code: Select all
var values = StiMvcViewer.GetFormValues();
You could get more information from the
Stimulsoft Programming Manual.
Thank you.
Re: GetReportSnapshot HttpPost
Posted: Thu Feb 11, 2016 8:03 am
by Michail
Hello. Thx.
"Returns the value of the form, which initiates (opened by POST query) the viewer page"
1) I have form and handler on submit button, which redirects me to new page with viewer. Its work
2) I have form and handler on button, which loads viewer as partial. Its dont work. (based on the logic of the first point) I used form.serialize() as data in ajax method, its work.
Do I understand that I have no choice but to send form.serialize() as data to method which generates viewer page as partial?
I hope that "idForm" will be added to StiMvcViewerOptions and using this id you can send data to GetReportSnapshot (if it possible)
Re: GetReportSnapshot HttpPost
Posted: Fri Feb 12, 2016 6:53 am
by HighAley
Hello.
As a way you could use JavaScript code to populate values from your form:
Code: Select all
jsMvcViewer.options.formValues = { name1: "value", name2: 123 };
They will be passed to GetReportSnapshot.
Thank you.