我想在ireports中添加一个查询。但它给了我
{
'collectionName':'weekly_jasper_reports',
'findQuery':
{
'$markets':'"+{'Markets':null}+"'
}
}
^
com.mongodb.util.JSONParseException: {'collectionName':'weekly_jasper_reports','findQuery':{'$markets':'"+{'Markets':null}+"'}}
^
at com.mongodb.util.JSONParser.read(JSON.java:455) at com.mongodb.util.JSONParser.parseObject(JSON.java:424)
at com.mongodb.util.JSONParser.parse(JSON.java:378) at com.mongodb.util.JSONParser.parseObject(JSON.java:414)
at com.mongodb.util.JSONParser.parse(JSON.java:378) at com.mongodb.util.JSONParser.parse(JSON.java:328)
at com.mongodb.util.JSON.parse(JSON.java:287) at com.mongodb.util.JSON.parse(JSON.java:272)
at com.jaspersoft.mongodb.query.MongoDbQueryWrapper.processQuery(MongoDbQueryWrapper.java:104)
at com.jaspersoft.mongodb.query.MongoDbQueryWrapper.<init>(MongoDbQueryWrapper.java:93)
at com.jaspersoft.mongodb.query.MongoDbQueryExecuter.createDatasource(MongoDbQueryExecuter.java:117)
at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1112)
at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:689)
at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1281)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:900)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:87)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:276)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:745)
at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:891)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
我错的任何建议? 感谢
答案 0 :(得分:0)
显然这个JSON的语法有问题。我会想象双引号已经过时了。