objectid in multi-select input control

0

 

I have a multi-select input control in my report which displays a list of names. The _id in the collection are of the type 'org.bson.types.ObjectId'.

When I am trying to load the report on Jasperserver-pro I get the error message as

 

'ERROR ReportsServiceCallTemplate,http-bio-8080-exec-3:73 - Unexpected error occurs java.lang.IllegalStateException: Processor of type com.jaspersoft.jasperserver.war.cascade.handlers.converters.DataConverter for class org.bson.types.ObjectId not configured  '

What am I missing here?

730.saurabh's picture
Joined: Dec 2 2013 - 4:15am
Last seen: 5 years 6 months ago

1 Answer:

0

Try with objectId.value() option

Ex:

{
 'collectionName' : 'user',
  mapReduce : {
    map : 'function () {
                         emit (this._id,{ id : this._id.valueOf(), lastname:this["last-name"]});
                        }',
    reduce : 'function (key, values) {
                  var allDetails = [];
                  var user = { id: null, lastname : null};
                  for( var index = 0; index < values.length; index++)
                  {
                    user.lastname = values[index].lastname;
                    user.id = values[index].id;
                    allDetails.push(user);
                    user = { lastname : null};
                  }
                   return {list : allDetails}
               }',
    out : 'list'
  }
}

 

 

nithyanand11's picture
Joined: Jul 19 2010 - 12:11am
Last seen: 5 years 5 months ago
Feedback