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 [IBM ILog Elixer](http://www.ilog.com/visualization/trials/) library has an [organization charting component](http://www.adobe.com/devnet/flex/tourdeflex/web/#sampleId=14500;illustIndex=0;docIndex=0). It's not free, but it fits the bill of what you are looking for.