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

Highlight the detail band

edited November 2014 in General
Hi,

I'd like to highlight the detail band choosed by mouse button, in order
to make it more visible.

The only one line, in each click, choosed by the mouse button.

Could you please guide me how to do that?

Thanks

Comments

  • edited November 2014
    Hi Ailton,

    This is an interesting idea. I just created an article and example
    describing how one might go about accomplishing this.

    http://www.digital-metaphors.com/rbWiki/Delphi_Code/Formatting/How_To..._Highlight_Clicked_Detail_Bands

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2014
    Hi Nico.

    I want tell you, how I make this in my app. (and may be you add some of
    this in next RB version):

    1. My idea: don't put any shapes in report designer. I create special
    DrawCommands (TmyBandSelectDrawCommands) in OnCreateDrawCommand event for
    all bands from MAIN report. Code for this event is very similar to
    CreateBGDrawCommand method.
    You can make this internally, like you create BGDrawCommands.

    2. TmyBandSelectDrawCommands has next functionality:
    a. List of DrawCommands for all internal objects.
    b. For DrawCommand classes I register special TDrawCommandModifiers that
    change and restore some properties (Brush.Color, Brush.Style,
    Gradient.Style, Transparent) of DrawCommands.
    TmyBandSelectDrawCommands contains list of this modifiers for DrawCommands
    from it List.

    3. I add TBandSelectDrawCommandRenders for all devices so that it not
    visible in any of them.
    As result - selection visible in viewer only (not visible when report
    printed on printer or file).

    4. I create special modifications of (txt and xls Data) devices, so that
    they can print selected bands only. Additionally I used this txt device
    for copy text from selected bands in clipboard.

    5. I add TmyReportPreviewSelectionController to Previwer. So in any
    preview user can save selection to clipboard or save it in file.

    6. In my app for detail bands I add additional data (bookmark or Key) in
    TmyBandSelectDrawCommands. So I can show popup with context commands for
    selected detail bands.
    In common case you can add events to TppReport -
    OnCreateBandSelectDrawCommand, and GetBandSelectDrawCommandActions as
    example.

    7. Additionally, I have two kinds of selection - Bands and
    TextDrawCommands. In second case I can print and copy in clipboard single
    draw commands.


    On Wed, 12 Nov 2014 23:59:57 +0300, Nico Cizik (Digital Metaphors)
  • edited November 2014
    Hi Dima,

    Thanks for the feedback. (Nico is out this week, I'll make sure he sees
    this next week)



    Best regards,

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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited December 2014
    Will be happy to help you with this issue.
    I have some kind of realisation a working
    I have the working implementation in my application (without changing the
    RB source code)
    But additionally I have ideas what I want to add in RB source for this
    issue

    On Wed, 26 Nov 2014 19:31:02 +0300, Nard Moseley (Digital Metaphors)
  • edited December 2014
    Thanks Dima,

    I will take a look at this and possibly add it as a feature for a later
    release.

    Best Regards,

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