Question: Does anyone know of any opensource tool for creating dynamic organization chart in flex by reading values from database

Answer: 
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 contact me because I'm working closely with them)
The most polished "free" components I've seen are the [KapLab Visualizer](http://lab.kapit.fr/display/visualizer/Visualizer) that Pez mentioned.

However for actual open source your best be is the [BirdEye](http://code.google.com/p/birdeye/) Information Visualization and Visual Analytics Library. Check out the [demo](http://birdeye.googlecode.com/svn/branches/ng/examples/demo/BirdEyeExplorer.html), the "Graphs" tab and I think tree is right up your alley. BirdEye is built with [degrafa](http://www.degrafa.org/) as is [axiis](http://axiis.org/) another open source data visualization library.

Good luck!