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

objectid in multi-select input control


730.saurabh
Go to solution Solved by nithyanand11,

Recommended Posts

 

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?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

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'
  }
}

 

 

Link to comment
Share on other sites

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