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

Save to XLS - Custom componets GetTheText value isn't used

edited August 2011 in General
Hey Guys,

Since upgrading to V12 a custom component we have no longer shows the
correct value when we print to file (previewing the report works fine).

Stepping through the GetTheText Function we return the correct value but
when I view the XLS it's incorrect.

We're using Delphi 2007 and 12.05 of RB

Any ideas?

Regards,
Brenton McSweyn
Happen Business

Comments

  • edited August 2011
    The XLS export uses the DrawCommand.DataType and DrawCommand.Value
    properties. The RB components implement special logic to handle the
    OnGetText case. Open ppCtrls.pas and search for OnGetTextUsed. This is an
    internal boolean which is set in TppCustomText.GetText and used in
    TppDBText, TppVariable, and TppSystemVariable method implementations for
    PropertiesToDrawCommand.

    In my testing this works correctly for the RB components.

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2011
    Thanks Nard. I'll have a look into this and see if I can work out the issue.

  • edited August 2011
    Changing our code to overwrite the OnGetText event rather than GetTheText
    fixed the problem.

    Thanks for the help.

This discussion has been closed.