This is a migrated thread and some comments may be shown as answers.

Pass value from MVC 5 action into a parameter of Telerik Reporting

2 Answers 474 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Juan
Top achievements
Rank 1
Juan asked on 05 Oct 2017, 03:05 PM

I have a Controller action that receives a value through ajax, and I want to pass that value as parameter to a query I did in the report.
This is my controller action:

public ActionResult OrdenCompraReport(int value)

{

    /Here i want to pass the value into a parameter on Telerik reporting

    return View();

}

And this is my query in my sqlDataSource of Telerik Reporting:

select oc.OrdenCompraNumero, oc.FechaDeEmision, fp.Nombre, a.Nombre, a.Contacto, a.Direccion, a.CorreoElectronico, a.Ruc, a.Telefono

from OrdenCompras oc 
join FormasPago fp on oc.FormaPagoCodigo = fp.Codigo
join Aseguradoras a on oc.AseguradoraCodigo = a.Codigo
where oc.OrdenCompraNumero = @OrdenNro

@OrdenNro is the name of the parameter. Any ideas of how can i do this?

2 Answers, 1 is accepted

Sort by
0
Juan
Top achievements
Rank 1
answered on 07 Oct 2017, 01:10 PM
Help please!!
0
Squall
Top achievements
Rank 1
answered on 10 Oct 2017, 07:12 AM
How to do this is explained here: https://docs.telerik.com/reporting/mvc-report-viewer-howto-custom-parameters
Tags
General Discussions
Asked by
Juan
Top achievements
Rank 1
Answers by
Juan
Top achievements
Rank 1
Squall
Top achievements
Rank 1
Share this question
or