himanshu.rawat Posted May 9, 2013 Share Posted May 9, 2013 Hi All,Is there a way to read directory recursively and its contents? Below sample example can provide more details on my objective.Directory : /opt/opennms/share/rrd/snmp/2 , following directories are createdls -DR umOrgIndex/umOrgIndex/: 0 101 103 107 111 112 115 119 umOrgIndex/0: strings.properties umOrgMsgsDiskUsage.jrb umOrgMsgsSize.jrb umOrgIndex/101: strings.properties umOrgMsgsDiskUsage.jrb umOrgMsgsSize.jrb umOrgIndex/103: strings.properties umOrgMsgsDiskUsage.jrb umOrgMsgsSize.jrb umOrgIndex/107: strings.properties umOrgMsgsDiskUsage.jrb umOrgMsgsSize.jrb umOrgIndex/111: strings.properties umOrgMsgsDiskUsage.jrb umOrgMsgsSize.jrb umOrgIndex/112: strings.properties umOrgMsgsDiskUsage.jrb umOrgMsgsSize.jrb umOrgIndex/115: strings.properties umOrgMsgsDiskUsage.jrb umOrgMsgsSize.jrb umOrgIndex/119: strings.properties umOrgMsgsDiskUsage.jrb umOrgMsgsSize.jrbNext I was trying to use them in reports ( jrxml ). Reports will be having rows/columns like below Org Id / Org Name / Org Disk Usage / Org Message Size 0 test.com 45 % 300101 test2.com 75 % 450103 test3.com 20 % 100For jrb files, I will use query string as "jrobin".string.properties have org name like test.com, test2.com etcetera.Please tell me how it can be done.Thanks in advance.Regards,Rawat Link to comment Share on other sites More sharing options...
Thomas Zimmer Posted May 11, 2013 Share Posted May 11, 2013 let me say, there is no perfect solution for this. but once, I built soemthing similar: just implement a subreport which will be called recursivly. Then pass the datasource (tree structure of your directories), respectivly subtrees to the subreport.It´s not so easy, but it can be done.Cheers, Thomashttp://www.thomaszimmer.net Link to comment Share on other sites More sharing options...
himanshu.rawat Posted June 3, 2013 Author Share Posted June 3, 2013 Hi Thomas, Thank you for the reply. I will try that. Cheers, Rawat Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now