lundi 30 novembre 2015

ireports generation with

I've been working on ireports recently, mvc 3.0

I've a view with a textbox 'empsrch'. I need to pass this value to ireports jrxml query. I dont know how to bind value in query without parameters.

All I want to know is how to bind value of a textbox from a mvc view to jrxml - query

my jrxml query is like this:

<![CDATA[select ROW_NUMBER() OVER(order by EDM_EMP.Updatedon desc)  AS [S.No],* from (
select module as ModuleName, PageName, field as FieldName,LTRIM(RTRIM(isnull(dbo.GetEmployeeID(R.empuid),' '))) as EmployeeID,
LTRIM(RTRIM(isnull(dbo.GetEmployeeName(R.empuid),' '))) as EmployeeName, oldvalue as OldValue, newvalue as NewValue, isnull(dbo.GetEmployeeId(U.EmpUID),' ') as UpdatedBy,
case edm_Employee.IsResigned
when 1
then 'Resigned'
when 0
then 'Live'
else ''

end as EmployeeStatus,
CONVERT(VARCHAR(19),R.updatedon) as UpdatedOn,
R.EmpUID as EmpUID ,D.Name as dgname

from Audit_Masters_Log R
left join Users U on U.UserUID=R.updatedby
left join edm_Employees as edm_Employee on edm_Employee.EmpUID=R.EmpUID
left join edm_um_Designation as D on D.DesignationID = edm_Employee.DesignationID
WHERE edm_Employee.FirstName like $P{Name} and EmployeeID like $P{EmployeeID} and R.UpdatedOn between $P{FromDate} and $P{ToDate} and D.Name in ($P!{Designations})) EDM_EMP]]>

need the textbox value for where condition to filter results?

Aucun commentaire:

Enregistrer un commentaire