unfortunately it doesn't. The order mode of the datasource is group by
to group the result by the objectid and _count_ the records in each
group. I have added the recid as aggregation field (COUNT). this
gives me an unsorted list of the object ids with the correct
record counts.

If I add the recid as sort field - as the order mode of the datasource
is group by, it will group the result by recid and hence will give
me a result set that contains each single record ungrouped.

Shruti schrieb:
> If u desire to sort the output by descending RecId then simply add the RecId field to the Sorting of the query and also set the Ordering property of the field to descending.
> I feel this will solve your problem.
> Regards::
> Shruti Jain
> Euroinfo Systems Pvt. Ltd.
> C-126, Sector - 2
> Noida - 201301 (U.P.)
> Phone :- +91-120-2520414
>
>
>   ----- Original Message -----
>   From: Stefan Osterburg
>   To: [email protected]
>   Sent: Monday, January 24, 2005 5:16 PM
>   Subject: Re: [development-axapta] Grouping and sorting in a report
>
>
>   thank you for your answer. however the problem that is giving
>   me the most troubles is not limiting the output to top 100,
>   but sorting the output descending by the recid-count.
>
>   Shruti schrieb:
>   >     This could be done by writing this code in the fetch method of the report.
>   > I considered CustTable for example.
>   >
>   >
>   >     QueryRun        qr;
>   >     CustTable      _custTable;
>   >     int i= 1;
>   >     ;
>   >     qr = new  QueryRun(this.query());
>   >     //ret = super();
>   >     if(qr.prompt())
>   >     {
>   >             while( i<= 100)
>   >             {
>   >                 qr.next();
>   >                  _custTable = qr.get(tablenum(CustTable));//CustTable hereby used signifies                                                                                                             //the table name as in query of report
>   >                 this.send(_custTable);
>   >                  i++;
>   >             }
>   >         return true;
>   >      }
>   >     return false;
>   >
>   >
>   >
>   > Regards::
>   > Shruti Jain
>   > Euroinfo Systems Pvt. Ltd.
>   > C-126, Sector - 2
>   > Noida - 201301 (U.P.)
>   > Phone :- +91-120-2520414
>   >
>   >
>   >   ----- Original Message -----
>   >   From: Stefan Osterburg
>   >   To: [email protected]
>   >   Sent: Monday, January 24, 2005 4:18 PM
>   >   Subject: [development-axapta] Grouping and sorting in a report
>   >
>   >
>   >
>   >   Hi,
>   >
>   >   I have a problem with creating a report I need.
>   >   I have a table with orders and an object id, and
>   >   want to get a list of "Top 100" orders. In standard
>   >   SQL I would do something like this
>   >
>   >   select ObjectId,count(Recid) as number
>   >         from orders
>   >         group by ObjectId
>   >            order by number
>   >
>   >   However I cannot find way to build a report query
>   >   to do this, as the "Ordermode" is per table and not
>   >   per field.
>   >
>   >   Is there a way to do this in Axapta without doing
>   >   lengthy coding?
>   >
>   >   Stefan     
>   >
>   >
>   >
>   >
>   >
>   > ------------------------------------------------------------------------------
>   >   Yahoo! Groups Links
>   >
>   >     a.. To visit your group on the web, go to:
>   >     http://groups.yahoo.com/group/development-axapta/
>   >      
>   >     b.. To unsubscribe from this group, send an email to:
>   >     [EMAIL PROTECTED]
>   >      
>   >     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>   >
>   >
>   >
>   > [Non-text portions of this message have been removed]
>   >
>   >
>   >
>   > 
>   > Yahoo! Groups Links
>   >
>   >
>   >
>   > 
>   >
>   >
>   >
>
>
>
> ------------------------------------------------------------------------------
>   Yahoo! Groups Links
>
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/development-axapta/
>      
>     b.. To unsubscribe from this group, send an email to:
>     [EMAIL PROTECTED]
>      
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
> [Non-text portions of this message have been removed]
>
>
>

> Yahoo! Groups Links
>
>
>

>
>
>






Yahoo! Groups Links

Reply via email to