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

csernak.adam001

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 csernak.adam001

  1. Hello! I have a mongo collection with person data and i would like to make a report with a Multi select query. I want to see data of more people on same time. If i use Single Select input control with mongo query is working, but when i change the control to Multi Select then the report throw an error. How can i create a query with a collection parameter? Parameter: PersonId ( org.bson.types.ObjectId ) Working query when i use Single Select : { runCommand: { aggregate : "personObject", pipeline : [ {$match : {_id :$P{PersonId}}}, {$project:{_id:1,personObjectName:1,receivedDate:1,}}, {$sort : {receivedDate : -1}} ] } } How can i change this query if i want to work with Multi Select?
  2. Hello! I would like to ask a little help with the Jasper - Mongo integration. So i have a mongo collection what store a receivedDate field and a lot of other data. I would like to get data which is in a specified date interval. My query is: { runCommand: { aggregate : "kvSignalObject", ------> Target collection pipeline : [ {$limit:1000}, -------> Limitation for testing {$match:{receivedDate:{$lte:$P{date}}}}, -------> Match condition (Which is not working) {$project:{signalType:1,receivedDate:1}} -------> Target fields ] }} The "date" is a Jasper parameter. This type is java.util.Date() and his Default Value Expression is ("new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss-SSS'Z'").format(new java.util.Date())") It is return nothing, or return JSONParser exception.How can i figure out the problem? If I change the parameter to "2017-09-17T08:19:25.337Z" for example which is a valid data (Copy paste from Mongodb), then it is return nothing too. The question: My query syntax wrong or the Jasper mongodbquery cant handle the mongo date type properly in aggregation. Jasper Studio version: 6.3.0 Thanks in advance!
×
×
  • Create New...