HI. Just need a push in the right direction. If I make a report with a parameters panel for MVC, does (re)setting these call the controller's ReportSnapshot method again? If so, how can I access the user values in my controller method to return the right data?
For a completer picture, assume a report defaulting to a date range of a month, but having the ability to change those at will.
StiViewerMvc parameters
Re: StiViewerMvc parameters
Hello.
You could use next code in Interaction action to get values of parameters.
Thank you.
You could use next code in Interaction action to get values of parameters.
Code: Select all
public ActionResult InteractionEvent()
{
StiJavascriptParameters parameters = StiMvcViewer.GetViewerParameters();
var value = ((System.Collections.Hashtable)parameters.Parameters["variables"])["Variable1"];
return StiMvcViewer.InteractionResult();
}
Re: StiViewerMvc parameters
OK, that's how I get the parameters, but how am I passing back the new/changed dataset?
All the examples I can find pass in all data, then filter. I want to pass in only the relevant data, and reload when the filters change.
All the examples I can find pass in all data, then filter. I want to pass in only the relevant data, and reload when the filters change.
Re: StiViewerMvc parameters
Hello.
Here is code that change the value of variable when the Request from user parameters are passed.
You could register new data the same way here.
Thank you.
Here is code that change the value of variable when the Request from user parameters are passed.
You could register new data the same way here.
Code: Select all
public ActionResult InteractionEvent()
{
var par = StiMvcViewer.GetViewerParameters();
//par.Action
StiReport report = StiMvcViewer.GetReportObject();
report["Variable1"] = "жопа";
report.Render();
return StiMvcViewer.InteractionResult(report);
}