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

Can we draw a gantt chart in a detail band

edited May 2002 in General
I need to draw a gantt chart bar for each record in the detail band.
The gantt chart bar's start and end length depends on a field's value.

I cannot find any canvas property in any RB control nor detail band. Does
that mean it is not possible to custom draw a control in RB?

Thanks a lot in advance.

Dennis

Comments

  • edited May 2002
    Dennis,
    throw a TppImage in the detail band
    and put the gantt chart into that
    cu
    marc

  • edited May 2002
    One option is to draw to the canvas of a TImage object on the form in the
    detail band's OnPrint event. Then transfer the picture of the TImage into a
    TppImage in the detail band, i.e. ppImage1.Picture.Assign(Image1.Picture).
    Use Image1.Canvas for rendering. Also make sure to either size the TppImage
    properly in advance or enable it's Strech property.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    I have partial success with the method you mentioned.
    When I try to write (i.e.g Canvas.TextOut), the font looks ok on the screen
    but then when assigned to the TppImage, it looks rough. I believe it's
    because the resolution on screen is lower than that of the printer.
    If I try to scale it, I will have to scale the Font size as well. I am
    afriad that will have different scaling effect from other line/rectangles I
    draw on the canvas.

    The best way is to directly draw on the targeted TppImage. Is that possible?

    Dennis

    "Alexander Kramnik (Digital Metaphors)" ???g??
  • edited May 2002
    There is a Paintbox component which you can drop in the report. See our
    website in the friends section:

    http://www.digital-metaphors.com/rcl/twpaintbox.zip


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.