BIRT Exchange Forum: Create Null Groups or Bars - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Create Null Groups or Bars Rate Topic: -----

#1 User is offline   krisko Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 01-August 12


Posted 01 August 2012 - 02:56 PM

This one's going to be a bit hard to explain, but I'll try my best.

I am working on creating a chart for daily timeouts. What I currently have as my dataset is a log of each timeout that occurs over the course of a single-day time frame. In the table that I am deriving my chart from, I have two groups: One for the source of the timeout, and a group inside that for the Hour, which lists the minues each timeout happened during a particular hour. What I plan to do with this data is create a chart for each source, with a bar for each hour indicating how many timeouts occured during that particular day. My co-workers would like me to have a chart that shows all hours of the day, even if nothing happened during them. However, BIRT will only let me graph the data that I already have.

The number of columns is based on the number of hour groups that appear in each source. However, there is always at least one timeout in each one of those groups. My question is: how do I create null groups and or bars to indicate that nothing has happened? Is this even possible? Keep in mind that I am using a JDBC Data Source, so I can't really reproduce the data set here.

I do have one idea in mind, but I'm not sure exactly how to handle it. I'd like to try using the datetime as a value axis, but when I try that, the chart editor fails to recognize the string 2012-07-26 06:00:00 as a proper datetime. Is there a way to convert that string into datetime? I tried using the expression editor, but it wasn't working for me.

Attached File(s)


0

#2 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13105
  • Joined: 16-May 08


Posted 02 August 2012 - 02:35 PM

You could create a scripted or flat file dataSet that has all the hours of the day represented and do an outer join to make all the values from the new set appear.

If you'd like to change your string field from above into a date, you can use the following script:

importPackage(Packages.java.text);

df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
df.parse(row["myStringDate"]);

That should do it. Let me know if you have issues.
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#3 User is offline   krisko Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 01-August 12


Posted 02 August 2012 - 04:08 PM

I've figured it out, but thanks for helping me!
0

#4 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13105
  • Joined: 16-May 08


Posted 03 August 2012 - 06:45 AM

Not a problem. Let us know whenever you have BIRT questions! :)
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users