Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Create Null Groups or Bars
krisko
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.
Find more posts tagged with
Comments
mwilliams
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.
krisko
I've figured it out, but thanks for helping me!
mwilliams
Not a problem. Let us know whenever you have BIRT questions!