Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Crosstab - Get Column Grand Total Values

edited July 2006 in General
Delphi 6
RB 6.03

Hi there

I am trying to get access to the column grand total values. I know I can
access all Grand Total values (row and columns) through :-

procedure TfrmCT127.ppCrossTab1GetTotalValueText(Sender: TObject;
aElement: TppElement; aColumn, aRow: Integer;
const aDisplayFormat: String; aValue: Variant; var aText: String);
begin
aText := aText + ' (TV)';
end;


What value do I set the aElement class to access only Column Grand Totals?
eg (aElement is TppTotalDef).

I have had a look at the report demo's but cant see an answer.

The report I have is :-

Name No.Of Day Work

Lee 50
Joe 55
John 60
Grand Total 165

I need access the value 165, so I can convert this into a percentage.

Is it also possible to hide these column grand totals (caption + value) ie
hide 'Grand Total......... 165'

I hope this all makes sense.

Thanks

Lee Parvin

Comments

  • edited July 2006
    Hi Lee,

    If you know the size of the crosstab, you can check the aRow parameter and
    if it is the last row of the crosstab, assume that you are altering the
    column totals. Note that you can adjust the display format of any cell in
    the crosstab using the popup menu. You could use this to format the total
    as a percentage. Again if you know the location of the cell, you can set
    the visibility of the certian TppElement that you would like to hide.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.