Jump to content
We've recently updated our Privacy Statement, available here ×

paolov

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by paolov

  1. Simple question: is it possibile to replicate this mongodb query in Jasper? db.getCollection('stock').aggregate([ {$match:{ CODE: {$in:db.getCollection('books').distinct("CODE",{ ID_GROUP:1012, })}, ID_STORE:"00001" }}, {$group:{ _id:"$ID_STORE", amtP: {$sum:"$QTY"} }}])[/code]The query fetch the number of books, belongings to the group 1012 , left in the store 00001. If it's possibile, how should a write that in jasper? cause i really can't figure it out how to put the "$in" argument. Thanks
  2. Hi, i'm trying to use a mongo db query with a $regex operator as condition for one of the field but while the same query used directly on a mongo db client works correctly, it does show any result in jasper. here and extract of the query i'm using: { 'collectionName' : 'myColl', findQuery :{ MOV : 'SCO-DDT', "CODE":{"$regex" : '^(?!GEN)(?!LOC)w*$'}, CODSTO : {"$in" : $P{Store}}, CODAGGRSECT_RPT03 : {"$in":$P{AggrSector}}, LIBNOLIB : "LIB", DATE : {'$gte' : $P{Date_From}, $lte : $P{Date_To}} } } As said, the same query executed directly from the mongo db shell works perfectly. i've also tried using $not instead of $regex { 'collectionName' : 'myColl', findQuery :{ MOV : 'SCO-DDT', "CODE":{"$not" : '(^GEN|^LOC)w*$'}, CODSTO : {"$in" : $P{Store}}, CODAGGRSECT_RPT03 : {"$in":$P{AggrSector}}, LIBNOLIB : "LIB", DATE : {'$gte' : $P{Date_From}, $lte : $P{Date_To}} } } but in this case Jasper return a mongo db error: "$not needs a regex or a document" anyone else have these problems with $regex and $not? thanks
×
×
  • Create New...