Home RAP

RAP and Crosstab.OnGetValueText and GrandTotals

edited November 2002 in RAP
Hi,

I want to format only the value fields, not the dimension fields or the
total or grandtotal fields.
I've tried to use the OnGetTextValue and that works fine, except the
grand total fields that I show in my crosstab get formatted as well. How
do I prevent this using RAP

regards
Paul Sjoerdsma

Comments

  • edited November 2002
    Check out crosstab demo #127. It should only format the values in that
    event. There are other events to format the total values, as the demo
    shows.

    The demo is in Delphi code, but the approach should be the same in RAP.

    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited November 2002
    Jim,

    I ahve seen that one, the values in the grand total row have a (V) after
    them, indicating a ValueText. So how do I distinguish between values
    that appear in a Grant Total row and other values.

    regards
    Paul

    In article <3de24be9@dm500.>, "Jim Bennett \(Digital Metaphors\)"
  • edited November 2002
    Looks like the demo is hooking into the wrong event handler. There is a
    OnGetTotalValueText event that isn't being utilized in the demo. Use that
    to get at the grand totals. Sorry about that.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited November 2002
    The reason I asked was because I already used the following events

    OnGetValueText --> aElement.Font.Color := clRed;
    OnGetTotalValue --> aElement.Font.Color := clBlack

    Now if I look at the color of the values in the total row they are ...
    red instead of black. So either this is a bug or I need to use some
    other means of deciding in the OnGetValueText if the current value
    belongs to the total row.


    regards
    Paul


    In article <3de520d3$1@dm500.>, "Jim Bennett \(Digital Metaphors\)"
  • edited December 2002
    I'm running RB 7 and in RAP using :
    CrossTab1OnGetTotalValueText(..

    begin

    aElement.Font.Color := clRed;

    aText := '55.55';

    end;

    CrossTab1.OnGetValueText...

    begin

    aElement.Font.Color := clBlue;

    aText := '66.66';

    end;

    When I use this code, the bottom row and right column totals are 55.55 in
    red and the inner values in the crosstab are 66.66 in blue. Can you send an
    example to support@digital-metaphors.com that doesn't work?


    Cheers,


    Jim Bennett
    Digital Metaphors

  • edited December 2002
    Jim,

    I'm using RB 6.03 Enterprise, so it might work with RB 7 I don't know.
    At the moment we are planning to move to RB 7 and have already invested
    in it, but it will take some months before we are ready to do so. In the
    meantime is there a workaround for RB 6 or have I missed something??

    regards
    Paul

    In article <3debb435$1@dm500.>, "Jim Bennett \(Digital Metaphors\)"
  • edited December 2002
    Jim,

    Using RB 6.03
    I had another look at crosstab demo 127 and it seems the right event
    handlers are there. I guess that is your demo.

    regards
    Paul

    In article <3debb435$1@dm500.>, "Jim Bennett \(Digital Metaphors\)"
  • edited December 2002
    I searched through the changes again, and there was a fix in RB 7 that
    changed the event id for the notification of the total value event. This
    would explain why it works in RB 7 and not RB 6.03. You'll have to upgrade
    to RB 7 to get the fix. Otherwise, you'll have to use a Delphi event handler
    for the CrossTab.OnGetTotalValueText event.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited December 2002
    Jim,

    Thanks for the clarification.

    regards
    Paul

    In article <3deccdfd$1@dm500.>, "Jim Bennett \(Digital Metaphors\)"
This discussion has been closed.