how to pass parameter to saverport with mvc from page?

Stimulsoft Reports.WEB discussion
Post Reply
5441323@qq.com
Posts: 13
Joined: Thu Feb 23, 2017 9:55 am

how to pass parameter to saverport with mvc from page?

Post by 5441323@qq.com »

how to pass parameter to saverport with mvc from page?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: how to pass parameter to saverport with mvc from page?

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.
5441323@qq.com
Posts: 13
Joined: Thu Feb 23, 2017 9:55 am

Re: how to pass parameter to saverport with mvc from page?

Post by 5441323@qq.com »

thank you for your replay,

how to pass parameter from page to action savereport with mvc5 page?

in my index view page ,i use ajax like this : when click button,

ajax:url: '/StiRptTemplate/StiRptDesign?keyValue=' + templatepath,

StiRptTemplate controller like this:
public ActionResult StiRptDesign()
{

return View();
}
will rerurn StiRptDesign.cshtml,

StiRptTemplate controller like this:
public ActionResult SaveReportTemplate(????)
{
StiReport report = StiMvcMobileDesigner.GetReportObject(HttpContext);
report.Save(@"D:\" + report.ReportName + ".mrt");

return StiMvcMobileDesigner.SaveReportTemplateResult(HttpContext);
}

i want to know the action SaveReportTemplate how to receive parameter from url: '/StiRptTemplate/StiRptDesign?keyValue=' + templatepath?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: how to pass parameter to saverport with mvc from page?

Post by Vladimir »

Hello,

You can use the standard MVC action parameters:

Code: Select all

public ActionResult SaveReportTemplate(string keyValue)
{
StiReport report = StiMvcMobileDesigner.GetReportObject(HttpContext);
report.Save(@"D:\" + report.ReportName + ".mrt");

return StiMvcMobileDesigner.SaveReportTemplateResult(HttpContext);
}
The amount and names of the parameters can be any.

Thank you.
5441323@qq.com
Posts: 13
Joined: Thu Feb 23, 2017 9:55 am

Re: how to pass parameter to saverport with mvc from page?

Post by 5441323@qq.com »

Thank you
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: how to pass parameter to saverport with mvc from page?

Post by Alex K. »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply