Jump to content

BIRT Developer Center Download

- - - - -

Starting Crosstab hours at 0

crosstab birt hourly

  • Please log in to reply
2 replies to this topic

#1 daftscience



  • Members
  • Pip
  • 5 posts

Posted 14 February 2017 - 09:39 PM

I'm trying to create a crosstab that shows a total count for each hour. However, I have some rows without any data. 


When I turn on "Show Empty Rows" it will fill in the missing data points for me but it also shifts the range by one hour. So anything that happened between 00:00 and 01:00 doesn't show up. 


Here is a screenshot showing an example of each setting (I just realized the title shouldn't say percent  :unsure: )


Is there any way to fill empty rows with "0" but also keep the starting position at 00:00?



Thanks in advance. 

#2 Clement Wong

Clement Wong

    Senior Member

  • BIRT Experts
  • 1078 posts

Posted 16 February 2017 - 06:56 PM

For me to create an example, can you please provide some more information.


Is this Open Source BIRT, or commercial BIRT?  What version?


Crosstab, or chart?


What is your data look like for the X-Axis?  Date/time?  Integer?


What's your data source?  That is, is it coming from a database?  If so, which one?


So instead of percentage, it's a count?


Ultimately, we'll implement one of the techniques I described here, depending on whether you're using OS BIRT, or commercial BIRT.  If you're using OS BIRT and can't do this in the database, check out option 3 and I've included an example.



Option 3 example output:
Attached File  Filling empty hours with 0s and starting at 0.png   35.97KB   0 downloads

Clement Wong
Principal Analytics Architect

OpenText Corporation
http://www.actuate.com | http://www.opentext.com

#3 daftscience



  • Members
  • Pip
  • 5 posts

Posted Yesterday, 09:22 AM

Thank you for your help. Here are the answers to the questions you had. 

  • It's probably commercial, but I'm not sure... It's a customized version of birt made for our database software.
  • That is the chart view of a crosstab
  • I think the data source is a customized JDBC Data Source (it's confusing...)
  • I copied a chart script I made from another report.  The script was adding "Percent" to the chart title, but the values are counts. It was something I noticed when I made the post, and irrelevant to the issue.

The version of Birt I'm using has been modified quite a bit. I actually can't load .rptdesign files. However, it looks like the scripted data source solution might work for me. 


I'll let you know when I'm able to test it out. 

Also tagged with one or more of these keywords: crosstab, birt, hourly