Problem accessing groupes values with mongodb

Hi everybody,

I'm a newcommer to Jaspersoft. I have a query in jaspersoft Studio (with a mongodb datasource) like this:

{
   runCommand: {
        aggregate : 'Fait',
        pipeline : [
                {
                        $group : {
                                _id : {pref:'$prefixSociete',typ:'$typeOperation'},
                                total: {
                                        $sum : '$montant'
                                }
                        }
                },
                {
                        $sort : {
                                _id:1
                        }
                }
        ]
}
}

Accessing "_id" with a text field (with: $F{_id} ) gives me something like that:

{"pref":"BP",typ:-1010}

So far, so good! I would be glad to access the values behind the field named "$prefixeSociete" or even other fields comming from the collection named "Fait". Does anyone have an idea on how I could achieve this?

Thanks for helping in evaluating Jaspersoft as the apropriate solution for my company.

l.reenaers's picture
Joined: Nov 6 2013 - 6:01am
Last seen: 9 years 3 months ago

0 Answers:

No answers yet
Feedback