Jump to content
Changes to the Jaspersoft community edition download ×

Jasper Mongodbquery - Multi selected parameter problem


csernak.adam001

Recommended Posts

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? 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...