Does anyone know of any opensource tool for creating dynamic organization chart in flex by reading values from database
Have a look at KapLab (http://lab.kapit.fr)
They have free data vizualisation components. I think you might be interested by the Visualizer component.
It's not open-source though, but you can get the source code if you buy a licence.
(If you need more info, you can still mail me cause I'm working closely with them)
The IBM ILog Elixer library has an organization charting component. It's not free, but it fits the bill of what you are looking for.
The most polished "free" components I've seen are the KapLab Visualizer that Pez mentioned.
However for actual open source your best be is the BirdEye Information Visualization and Visual Analytics Library. Check out the demo, the "Graphs" tab and I think tree is right up your alley. BirdEye is built with degrafa as is axiis another open source data visualization library.
Good luck!