Jump to content
Changes to the Jaspersoft community edition download ×

Jasper Domain - SQL Function Doesn't Work in Calculated Fields


riodavid

Recommended Posts

Here it says: https://community.jaspersoft.com/documentation/sql-functions-0

    You may use SQL functions in a DomEL expression, but only in limited circumstances:    •     The functions must be supported by the database. See the vendor documentation for available functions and their syntax.    •     The functions must follow the convention of comma-separated parameters. For example, you can use TRIM(person.name), but not TRIM('Jr' FROM person.name)    •     The type of the return values must be appropriate, either within the expression or for the type of the calculated field.    •     The SQL context must be appropriate for the functions. For example, you cannot use aggregation functions such as COUNT in a calculated field because there is no GROUP BY clause.[/code]

I think a Year() function of SQLServer satisfies above conditions. But when I tried to use the Year() function, I got empty results.

The most strange thing is, the genrated SQL works perfectly in my SQLServer Studio. But it just gave empty results in Ad-Hoc View.

Please check the screenshot: https://postimg.cc/image/3o6oc9wf1/

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...