Jump to content

BIRT Developer Center Download


Photo
- - - - -

Starting Crosstab hours at 0 (Solved)

crosstab birt hourly

  • Please log in to reply
3 replies to this topic

#1 daftscience

daftscience

    Newbie

  • Members
  • Pip
  • 6 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: )
5jgB5Ok.png
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
  • 1104 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.

http://developer.act...chart/?p=146807

 

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


  • daftscience likes this

Clement Wong
Principal Analytics Architect

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


#3 daftscience

daftscience

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 21 February 2017 - 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. 



#4 daftscience

daftscience

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 01 March 2017 - 05:12 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.

http://developer.act...chart/?p=146807

 

Option 3 example output:
attachicon.gifFilling empty hours with 0s and starting at 0.png

 

 

That worked! Initially I was having trouble because I was applying filters and table groups... It didn't play nice with the Joined table. I have it working now though..

 

Thank you for your help!







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