Dynamic query with mongodb in BIRT [message #1455451] |
Wed, 29 October 2014 11:36 |
Tadeo Julián Segarra Messages: 1 Registered: October 2014 |
Junior Member |
|
|
I have to make a birt report with 1 parameter which should be used in query. The parameter is a string.
I tried to do it in beforeOpen dataset as indicated for sql queries, but it has not worked.
I write in beforeOpen expression dataset:
this.queryText = '{
"findQueryExpr": { "ref": "'+params["ref"].value+'" } ,
"operationType" : "FIND" ,
"collectionName" : "events",
"queryReadPreference" : "secondary" ,
"selectedFields" : [ "ref" , "sts" , "rts" , "c.value" , "c.type" , "c.quality" , "r.value" , "r.type" , "r.quality"]
}';
And the query is throwing on the total number of documents in the collection regardless of the parameters.
It is possible to make mongo query in Birt with parameters?
|
|
|
Re: Dynamic query with mongodb in BIRT [message #1463035 is a reply to message #1455451] |
Thu, 06 November 2014 06:25 |
|
I've not tried it, but if you create a standard query that you know works using the query builder, then, look at the XML source to see the structure of the query, it might help you out in changing the query. Let me know.
Michael
Developer Evangelist, Silanis
|
|
|
|
Powered by
FUDForum. Page generated in 0.04183 seconds