Using SQL for calculated fields

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.

angelo.1981's picture
Joined: Jan 9 2017 - 1:22am
Last seen: 4 years 9 months ago

1 Answer:

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="" value="MyDatabase-AdapterName"/>  <queryString>   <![CDATA[SELECT * FROM Table1]]>  </queryString> </subDataset>
peter.w's picture
Joined: Oct 12 2012 - 6:57am
Last seen: 1 week 5 days ago