Jump to content
Changes to the Jaspersoft community edition download ×


  • Posts

  • Joined

  • Last visited

DerekGannaway's Achievements


Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare

Recent Badges



  1. In your query you can use the GROUP_CONCAT function and GROUP BY the field you don't want duplicated to achieve that result. Here's an example table with duplicated data: StateCityNew YorkNew York CityNew YorkSyracuseCaliforniaLos AngelesCaliforniaSan FranciscoTexasAustin With the below query SELECT state, GROUP_CONCAT(city SEPARATOR ", ") AS cities FROM table GROUP BY state[/code]The data will now be displayed as statecitiesNew YorkNew York City, SyracuseCaliforniaLos Angeles, San FranciscoTexasAustin You can also sort the cities or remove duplicates from that field as well with additional functions inside the GROUP_CONCAT. More information about GROUP_CONCAT can be found at https://dev.mysql.com/doc/refman/8.0/en/group-by-functions.html#function_group-concat
  2. Try checking if the field is not null and just reverse the results: <textFieldExpression><![CDATA[$F{fieldName} != null ? $F{fieldName} : "-"]]></textFieldExpression>[/code]
  • Create New...