Problem accessing groupes values with mongodb

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

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: 8 years 6 months ago

0 Answers:

No answers yet
Feedback
randomness