I'm using MVC 3, and I use Telerik Report to call a method witch the parameter is the user id, and it should not be changed, so the user wouldn't see other user data.
public List<ViewBoleto> ListBoleto(long userid)
what I did was, in the report.cs, I let the parameter as:
new Telerik.Reporting.ObjectDataSourceParameter("userid", typeof(long), "=Parameters.userid.Value")});
so I set the value in ViewReport.aspx, and I set as Visible = false, so nobody could edit it.
rpt.ReportParameters["userid"].Value = ViewData["UserId"];
rpt.ReportParameters["userid"].Visible = false;
It works wonders, but there is a bug, when I click in Refresh, the "Navigate Back" button turns green, and if I click on it, the Parameters will turn to Visible = true, and the user can change the values!!!
Is there a better way to I call the method ListBoleto, and pass the parameter, and block the user from changing it?
public List<ViewBoleto> ListBoleto(long userid)
what I did was, in the report.cs, I let the parameter as:
new Telerik.Reporting.ObjectDataSourceParameter("userid", typeof(long), "=Parameters.userid.Value")});
so I set the value in ViewReport.aspx, and I set as Visible = false, so nobody could edit it.
rpt.ReportParameters["userid"].Value = ViewData["UserId"];
rpt.ReportParameters["userid"].Visible = false;
It works wonders, but there is a bug, when I click in Refresh, the "Navigate Back" button turns green, and if I click on it, the Parameters will turn to Visible = true, and the user can change the values!!!
Is there a better way to I call the method ListBoleto, and pass the parameter, and block the user from changing it?