MongoDB and BIRT Reporting?

前端 未结 4 1636
悲哀的现实
悲哀的现实 2021-01-13 14:50

Has anyone used BIRT to generate reports from MongoDB, can you describe how, any issues, etc. ?

It looks like it might be possible to interface using JDBC and this e

4条回答
  •  误落风尘
    2021-01-13 15:35

    I've successfully integrated BIRT with MongoDB - it works perfectly well. The idea is this - define a scripted data source in BIRT, then define a data set that using that data source. The data set has an "open" event in which you place the call to Mongo Java Driver and execute your query against MongoDB (and obtain a DB Cursor). Then in the "fetch" event you basically get the next value of the Cursor, filling data from the Cursor into the data set.

    This is possible because BIRT scripts utilize RHINO Javascript engine which has Java integration. Place the MongoDB java driver in the classpath and start coding :)

提交回复
热议问题