Jump to content
We've recently updated our Privacy Statement, available here ×

Using SQL user-defined functions in $X{}


vinayt

Recommended Posts

Am new to JasperReports. As part of creating a query in report, am facing an issue.


I have a sql query similar to below one : am trying to convert a date value to different date using a user defined SQL Function.


Select * from Person where (CreatedDate < dbo.ConvertLocalDateToUTC($P{dsRegistration_attemptEndDt_pDate_MinRange} + ' 00:00:00',$P{UserTimeZoneFK}))[/code]

How can i write the same Where clause in JasperReports using $X{} as the where clause contains a user defined function?


I tried to write as below, but it is not working.


Select * from Person where $X{LESS, CreatedDate, dbo.ConvertLocalDateToUTC($P{dsRegistration_attemptEndDt_pDte_MinRange} + ' 00:00:00',$P{UserTimeZoneFK}) }[/code]

Can any one please let me know, how can i use the Sql user-defined functions in sql queries ofJasperReports. Am working on this from 2 days, but still i couldn't get anything.


Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...