Hi Mark,

I'm not an SQL expert, but couldn't you first get the grand total as a
variable (unsure whether it would be best to do a preliminary query to
retrieve the single total or sum the total of the column in of your
current resultset - someone may be able to comment here).

Could you then use this var in a calculated field either in the static
field list of the dataset or in the QR itself.

Craig.


Mark Howard wrote:

> Hi Using SQL I want to assemble a dataset (to be used by a Quick
> Report) that will allow me to express each group total as a percentage
> of the grand total. I can't calculate the percentage at the group
> level in the report because we don't have the total until the end, so
> it seems that I need to have the grand total read into the
> dataset. Are there any tricky ways of achieving this? or is there no
> alternative to just doing a double pass through the dataset? TIA Mark

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to