jlopez_13 Posted July 11, 2018 Share Posted July 11, 2018 Hi, for months i have been trying to get arround this error. net.sf.jasperreports.engine.JRException: No results at com.jaspersoft.mongodb.query.MongoDbQueryWrapper.runCommand(MongoDbQueryWrapper.java:214) at com.jaspersoft.mongodb.query.MongoDbQueryWrapper.processQuery(MongoDbQueryWrapper.java:115) at com.jaspersoft.mongodb.query.MongoDbQueryWrapper.<init>(MongoDbQueryWrapper.java:93) at com.jaspersoft.mongodb.query.MongoDbQueryExecuter.createDatasource(MongoDbQueryExecuter.java:104) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1257) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:726) at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:456) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:578) at com.jaspersoft.studio.data.reader.DatasetReader.fillReport(DatasetReader.java:264) at com.jaspersoft.studio.data.reader.DatasetReader.start(DatasetReader.java:332) at com.jaspersoft.studio.property.dataset.preview.DataPreviewTable$5.run(DataPreviewTable.java:318) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) this is how the code looks like: {'runCommand': {'aggregate': $P{collection}, 'pipeline': [ {$match: {'$and': [ {'comapany': {'$regex': ${company}, '$optioins': 'i'}}, {'timeCreated': {'$gte': $P{bDate}, '$lte': $P{eDate}}} ]}}, {$project: { 'Z0': { $cond: [{'$not': {'$or': [{'$eq': ['$final', 'Zona 1']},{'$eq': ['$final', 'Zona 2']} ]}}, 1, 0]}, 'Z1': { $cond: [{'$and': [{'$eq': ['$final', 'Zona 1']}]}, 1, 0]}, 'Z2': { $cond: [{'$and': [{'$eq': ['$final', 'Zona 2']}]}, 1, 0]} }}, { $group: { _id: null, 'NUM_CNT':{$sum: 1}, 'CZ0': {$sum: '$Z0'}, 'CZ1': {$sum: '$Z1'}, 'CZ2': {$sum: '$Z2'} }}, {$sort: {_id: 1}}], cursor: { }}} Link to comment Share on other sites More sharing options...
cto_2 Posted July 14, 2018 Share Posted July 14, 2018 The issue is that the Jaspersoft mongodb Connector (js-mongodb-datasource-2.0.9.jar) - the code is expecting the result data as inline results ('results' field). But MongoDB 3.6 results a cursor.So it gives a 'No results exception' . This requires code change in the js-mongodb-datasource-2.0.9.jar and needs to be rebuilt. I could n't find the source of this component any where.Due to this issue, Jasper report is almost unusable in all typical reports with MongoDB 3.6 and 4.0Please help to resolve this issue Link to comment Share on other sites More sharing options...
sief Posted March 26, 2019 Share Posted March 26, 2019 just tried this with the latest connector from May 2018 (js-mongodb-datasource-2.0.10.jar), problem still exists.MongoDB 3.6 was released in November 2017 and 3.4 will reach End Of Life in September this year. Are there any plans to fix this? Link to comment Share on other sites More sharing options...
mohamed.aghoulas Posted July 9, 2019 Share Posted July 9, 2019 any new updates ?? i'm facing the same probléme 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