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

Checkbox style property

edited October 2006 in End User
Hi,

I have 2 checkboxes on an end user report that are being set via RAP code. I
am using the BeforePrint event of the relevant band.

Basically when another boolean variable value is true I want to set
Checkbox1.Style := csCheckMark and when it is false set Checkbox1.Style :=
csXMark, however it always just shows a tick (checkmark).

I can set the CheckBox1.Checked property to true or false in the same RAP
calc and it works as expected, it is just the Style property that won't
work. If I set the Style property manually in the designer to 'Checkmark
only' or 'X only' it displays OK so I know it is not a font issue.

Thanks,

Rick.

Comments

  • edited October 2006

    I created a simple test case and did not encounter any issues.

    - I created a report with a Checkbox in the detail band

    - I used the DetailBand.BeforePrint to implement the following code.

    if (Checkbox1.Style = csCheckMark) then
    Checkbox1.Style := csXMark
    else
    Checkbox1.Style := csCheckMark;


    When I preview the report, the result produced is alternating check-mark and
    X-marks down the page.


    - I tried a second test using the CheckMark.OnPrint event and that worked as
    well.


    I used RB 10.04 for my testing.


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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2006
    Hi Nard,

    Thanks for the suggestion but your code didn't work either. I noticed in
    another thread ('TmyDBCheckBox and color' in the general group) that there
    was a patch to enable the use of the color property in a checkbox. Could it
    be that the Style property has also recently been fixed / enabled ? If so
    could you email me the relevant patch ? Time constraints do not allow me to
    upgrade to version 10 at the moment.

    TIA

    Rick.

  • edited October 2006

    As I sated before - I used RB 10.04 for my testing.

    What version of ReportBuilder are you using? (Check the Help | About box of
    the Report Designer).

    For future reference, when posting, please specify the Delphi version and RB
    version that you are using.


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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.