GetReportSnapshot HttpPost

Stimulsoft Reports.NET discussion
Post Reply
Michail
Posts: 20
Joined: Wed Feb 20, 2013 6:16 am

GetReportSnapshot HttpPost

Post 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 :?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: GetReportSnapshot HttpPost

Post by HighAley »

Hello.

Could you specify which our viewer you use?

Thank you.
Michail
Posts: 20
Joined: Wed Feb 20, 2013 6:16 am

Re: GetReportSnapshot HttpPost

Post by Michail »

Hello.
StiMvcViewer
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: GetReportSnapshot HttpPost

Post by HighAley »

Hello.

Please, set next property:

Code: Select all

Server
{
    PassFormValues = true
}
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.
Michail
Posts: 20
Joined: Wed Feb 20, 2013 6:16 am

Re: GetReportSnapshot HttpPost

Post 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)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: GetReportSnapshot HttpPost

Post 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.
Post Reply