Jump to content
Changes to the Jaspersoft community edition download ×

Problem accessing groupes values with mongodb


l.reenaers

Recommended Posts

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                        }                }        ]}}[/code]

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

{"pref":"BP",typ:-1010}[/code]

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.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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