【问题标题】:How do I write expressions for Birt with Mongo?如何用 Mongo 为 Birt 编写表达式?
【发布时间】:2025-11-26 23:05:02
【问题描述】:

我找到了文档页面http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.birt.doc%2Fbirt%2Fds-HowToSpecifyWhatDataToRetrieveDataFromMongoDBDataSource.html,上面说我可以写一个Run Database Command expressionThe default command type is FindQuery。如何编写 FindQuery 表达式。

【问题讨论】:

    标签: eclipse mongodb grails birt


    【解决方案1】:

    在“编辑数据集”窗口中选择“$query Expression”按钮。然后输入您想要的查找查询...例如,如果您从 http://docs.mongodb.org/manual/tutorial/aggregation-zip-code-data-set/ 加载了 MongoDB 示例数据库

    您可以进行查找查询,例如:

    { pop: { $gte: 15000  } }
    

    这将搜索人口大于或等于 15000 人的所有记录。您还可以运行以下一些查找查询:

    { state: { $in: ["WA", "OR" ] } } //finds all of the cities in WA and OR
    
    {$and: [{ state:"WA" },{ pop: { $gte: 50000 } }]} //finds all of the cities in WA with a population greater than 50,000-
    

    【讨论】:

      最近更新 更多