Let's take an example :
class HouseOwners
{
private long ownerID;
private long houseID;
}Code to get the number of houses a owner has (where houseID >= 1000, and list only owners who have at least one house)
Criteria c = new Criteria();
c.addGreaterOrEqualThan("houseID", "1000");ReportQueryByCriteria q = new ReportQueryByCriteria(HouseOwners.class, c);
q.setColumns(new String[] {"ownerID", "sum(houseID)"});
q.addGroupBy("ownerID");
q.addOrderByDescending("sum(houseID)");Criteria having = new Criteria();
havind.addGreaterThan("sum(houseID)", "0");q.setHavingCriteria(having);
Then you just have to get your PB to execute the query :
Iterator iter = mybroker.getReportQueryIteratorByQuery(q);
Thomas
At 15:12 22/08/2003, you wrote:
Hello,
can anyone send me an example for using ReportQueryByCriteria.
thanks
Micha
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
