Hi,

I have 3 groups:

Project Type

Project Number

Project Hours

I'm trying to use the group sort order for the project numbers according to a column in my report, The "difference" column, which is obtained by the subtraction of "Current Hours" and "Budgeted hours" per project. I'd like to sort the report by the biggest difference to the smallest.

My columns:

Current Hours

Budgeted hours

Difference

The problem is that my "Current Hours" are obtained by a summary of the details section :

Sum ({timesheet.hours}, {projects.prjNumber}) + Sum ({timesheet.hoursOvertime}, {projects.prjNumber})

I know the group sort order function only works on summaries, in this case I'm using a formula and a summary to obtain the difference which I'd like to sort on; how I can sort my projects according to this?

A SQL Expression might be another option. I'm not sure, because I never used them (almost all of my reports used stored procedures, and you can't use SQL Expressions with stored procedures). For example, you may be able to use a SQL Expression to calculate the total "Current Hours", or Difference, for each project.

And to answer your earlier question about "extracting the value" for a formula, the basic problem is that CR run reports in passes, so the summaries are calculated in a certain pass, and even if you could somehow ignore the fact that they're summaries, the values simply won't be available until CR finishes that pass through the report.

James