MongoDB connection from Jaspersoft ‘iReport’

I have created a few DBs (largely copying pp 137 from the excellent ‘7 databases in 7 weeks’) and manually entered a dozen or so rows. The Mongo equivalent of select * from is dbfind()

And I’ve managed to install Japsersoft iReport.

So far, so good.

But…When I create a datasource connection from within iReport to MongoDB I am asked for 3 things
1 MongoURI
2 Username
3 Password

The pre-filled default for 1 is ‘mongodb://HOST:27017/DB_NAME’
I assume I substitute DB_NAME for towns (my recently created database) – but this doesn’t work.
I also assume I can leave a username and password as blank?
– As show users (in Mongo shell) returns nothing (and I haven’t yet created any)

So, brick wall. Have raised a JIRA @ MongoDB, hopefully someone can help me out!


2 thoughts on “MongoDB connection from Jaspersoft ‘iReport’

  1. It’s great to see another user of the Jaspersoft connector to MongoDB!

    “but this doesn’t work” That is [presumably] perfectly accurate, but it’s not perfectly precise. You don’t mention changing “HOST” to the relevant value. Did you? That might be the issue. From what you write, “towns” is probably the correct value for “DB_NAME”. If you’re still stuck, you ought to get some troubleshooting information by choosing the iReport menu option View -> IDE Log.

    I confirm that the username and password are optional. In fact, they should be null for the majority of users, since security is not enabled on most MongoDB systems. (But filling them in with random text should not cause a problem as long as security is really off.)

    I think where you wrote “dbfind()” you mean “db.mycollection.find()”. Depending on what you’re doing… don’t forget the formatted loveliness of findOne() as well.

    I know where you wrote “Japsersoft iReport” you mean “Jaspersoft iReport”.

    I’ll be interested to hear your results.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s