Skip to main content



      Home
Home » Archived » BIRT » Multiple data sets
Multiple data sets [message #242208] Tue, 12 June 2007 03:12 Go to next message
Eclipse UserFriend
Originally posted by: mastiz.fatronik.com

Hi,

I am trying to plot two tables obtained from a relational database into
the same line chart. Both tables have a dateTime field, which would be
represented in the X axis.

I have tried to use a secondary axis, but I haven't managed to change its
source data set.

One possible solution would be to OUTER JOIN the two tables and obtain a
huge resulting table with many NULL values, but this solution doesn't work
either, as the NULL values (within a column) are not apparently omitted.

Any ideas?

Thank you very much,
Mikel
Re: Multiple data sets [message #242251 is a reply to message #242208] Tue, 12 June 2007 09:00 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
The two different tables have the same stucture ?
If so why don't you do a SQL UNION in your dataset ?

-PY
Re: Multiple data sets [message #242266 is a reply to message #242251] Tue, 12 June 2007 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mastiz.fatronik.com

Hi,

Let's say the structure of the tables is the following:

Table1:
dateTime | value1 | value2 |
------------------------------------------
1-1-2007 | 1 | 2 |
2-1-2007 | 5 | 3 |
3-1-2007 | 7 | 4 |

Table2:
dateTime | position |
------------------------------
1-1-2007 | 8 |
1-1-2007 | 10 |
2-1-2007 | 0 |

I want to plot 'value1' and 'value2' using lines, and mark the values
stored in table2 as points. Note that the dateTime column in table2 is a
subset of the dateTime column of table1.

The only thing I can do so far is to outer join both tables, while
disabling the lines and enabling the markers for the column 'position'.
The result of the join would be as follows:

dateTime | value1 | value2 | position |
---------------------------------------------------------
1-1-2007 | 1 | 2 | 8 |
1-1-2007 | 1 | 2 | 10 |
2-1-2007 | 5 | 3 | 0 |
3-1-2007 | 7 | 4 | NULL |

As shown, this approach is not valid as there can be multiple values in
table2 for the same dateTime, which produce repeated values for 'value1'
and 'value2'.

This affects the chart, as those lines are not drawn properly. It seems
that having repeated values makes the engine draw only horizontal and
vertical lines, instead of drawing straight lines from one point to the
next.

I thought there would be another approach to just select multiple data
sets. Isn't that possible?

Thanks!
Mikel
Re: Multiple data sets [message #242287 is a reply to message #242266] Tue, 12 June 2007 11:07 Go to previous message
Eclipse UserFriend
Another solution would be to use the filter function wether on the dataset
or the chart data binding itself with such condition like POSITION is not
null.

-PY
Previous Topic:Scripted Data source error
Next Topic:Report displays error msg in Viewer when no rows found
Goto Forum:
  


Current Time: Fri Sep 26 22:13:22 EDT 2025

Powered by FUDForum. Page generated in 0.04578 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top