Jasper Ideas

Redshift support for time HH:MM:SS format using Sum() not Count()

When using a redshift database and have time stored in a integer such as seconds. To get the results in a SQL you have to use a query on the database like:

"seconds" * interval '1 sec' as "time"


But when you group them and aggregate as a summary calculation, you have to use the Sum() function BUT JasperServer only allows you to select a Count() function against a Time Java Type.


so when the Query runs for summary it runs with:

Count("seconds" * interval '1 sec') as "time"

Rather than:

Sum("seconds" * interval '1 sec') as "time"


There needs to be a change so that Time can be done as a Sum() on the SQL as well as option for Count()


This can be achieved by allowing in the domain designer on the server having Sum option on the summary calculation dropdown


This is important so that customers can see time in correct format rather than integer or decimal for hours

  • Nick Cox
  • Jun 17 2022
  • To be Reviewed
Components JasperReports Server, AdHoc, Domains
  • Attach files
  • Nick Cox commented
    17 Jun 04:05pm

    Tibco support have confirmed this :

    "will be a new feature that can be added to have SUM function for time field"