Jump to content
Changes to the Jaspersoft community edition download ×

Using SQL for calculated fields


Recommended Posts

I have a customer code that I fetch from a database table (in the report query), and I want to fetch a description for that code from another table, without use a join in the main query. It's possibile to use SQL syntax for a calculated field or there is another way to proceed?

Thanks for the answer.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

In Jasper Studio you can add a new data set

Right click on the report in the outline and chose Create Data Set 


This should create a subDataset in the jrxml something like this

<subDataset name="Dataset1" uuid="389126dd-bee9-4370-8d2f-72c1d645d833">  <property name="com.jaspersoft.studio.data.defaultdataadapter" value="MyDatabase-AdapterName"/>  <queryString>   <![CDATA[sELECT * FROM Table1]]>  </queryString> </subDataset>[/code]
Link to comment
Share on other sites

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