cabalamat Posted April 2, 2014 Share Posted April 2, 2014 I have a Mongo DB database and I want to extract data from it and produce reports in JasperReports. I've read http://community.jaspersoft.com/wiki/mongodb which discusses how to connect MongoDB to JasperReport.However that document only gives instructions for the GUI app version of JasperReports Server, and I am using the JasperReports Server web app.Is it possible, using the web app, for me to connect MongoDB to JasperReports? How? Link to comment Share on other sites More sharing options...
mike_28 Posted April 10, 2014 Share Posted April 10, 2014 I had a similar issue that I solved by the following:dowload iReport Designer or jaspersoft studio from sourceforgeCreate a Data Adapter and add your mongo database with login credentialsCreate a JasperReports Server Connection and refer it to your own JasperReports Server instanceCreate a new JasperReport using the Report WizardAfter creating your report, publish / upload it to your JasperReports Server.The .jrxml file will now be visible within your JasperReports Server as a 'Topic'Login and Create an Ad-Hoc-Report in your JasperReports ServerChoose the Topic selection and browse to the directory that you uploaded your report to previouslyAnd that should be it!However, the problem that I encountered througout this process was that there were no fields from my mongodb visible. The Jaspersoft Studio tool Preview produced an empty report. My database, called shortstories, has a collection called hardbackbooks. And each row in 'hardbackbooks' contains the 2 fields, content and created_date. The query string I used when creating the report is below; Can anyone help with this JasperSoft to MongoDB syntax, please? {collectionName : 'hardbackbooks', findFields : {'content':1,'created_date':1},rowsToProcess:20} 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