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

Is there a Event if in the Designer popups a Popup Menu?

edited December 2006 in General
Hello,

I'm searching for a event in the tppDesigner, which says to me that the
user has clicked the right mouse button on a band component for showing
the popup menu. I want to add one more Menu Item (if it not exists)
before the popup menu is showing. Can I determine on which band the user
has clicked the right mouse button?

Best wishes
Bernhard

Comments

  • edited December 2006
    Hi Bernhard,

    Unfortunately replacing or customizing the popup menus in RB 7.04 is not
    possible. Starting with RB 9.0, we completely redesigned the internal
    structure of the designer separating out all the components' menus and
    controls. This makes it very easy now to customize or replace the popup
    menus. I would strongly recommend that you consider upgrading to the latest
    version of ReportBuilder (10.04).

    ---------------------------------------
    Article: RB 9 Architecture Changes
    ---------------------------------------

    ReportBuilder 9 includes architecture changes to more cleanly separate
    Designer code from Report code. The code related to component popup menus
    and design controls has been broken out into separate classes.

    For an example, check out RBuilder\Demos\RCL.


    The myChkBox.pas unit contains the component classes....


    TppCustomComponent

    |
    |

    TMyCustomCheckBox

    |
    |-- TmyCheckBox
    |
    |-- TmyDBCheckBox


    The myChkBoxDesign.pas unit contains popup menu and design control classes.
    These are compiled into a separate package.


    A. Popup Menu classes....

    TppComponentPopupMenu

    |
    |

    TmyCustomCheckBoxPopupMenu

    |
    |-- TmyCheckBoxPopupMenu
    |
    |-- TmyDBCheckBoxPopupMenu


    B. Design Control classes.....



    TmyCustomCheckBoxControl

    |
    |

    TmyCustomCheckBoxPopupMenu

    |
    |-- TmyCheckBoxControl
    |
    |-- TmyDBCheckBoxControl

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2006
    Hello
    thanks for your answer. But I'm using since a lot of years with a trick
    the ability to customize popupmenus in the designer. But this works only
    correct with Printable Components not with bands because I have no event
    where I can customize the popup menu. In Printable Components I'm using
    the OnSelectComponent Event.

    Now I have a few questions to the version 10.04. Are running current
    reports from 7.04 on 10.04 without changes? We have about 1000 reports
    on customer side. Are there known problems with this old reports on
    10.04? How is it with third party products like WPTools (we are using
    Version 3) Does it run on 10.04?

    Best wishes
    Bernhard


    Here is the Code :

    if (FAktuellKomponente<>nil) and (FAktuellKomponente is
    tppPrintable) then begin
    pMenu :=
    tppPopupMenu(tppPrintable(FAktuellKomponente).DesignControl.PopupMenu);
    if pMenu.Items[0].Name=T_REPORT_POPUPMENUNAME then begin // Der
    Menüpunkt Name ist bereits vorhanden, dann wird er nu geändert mit dem
    neuen Komponentennamen
    pMenu.ItemByName(T_REPORT_POPUPMENUNAME).Caption :=
    T_REPORT_POPUPMENUNAME+': '+FAktuellKomponente.Name;
    end
    else begin // andernfalls wird der Menüpunkt Name angelegt mit
    dem aktuellen Komponentennamen

    pMenu.AddItem(0,T_REPORT_POPUPMENUNAME,T_REPORT_POPUPMENUNAME+':
    '+FAktuellKomponente.Name,0).OnClick := PopupMenuNameAusfuehren;
    pMenu.AddItem(0,'','-',0);
    pMenu.ItemByName(T_REPORT_POPUPMENUNAME).MenuIndex := 0;
    end;
    if FAktuellKomponente is tppRichText then begin
    pMenu.ItemByName(T_REPORT_POPUPMENUEDIT).Visible := False;

    pMenu.AddItem(0,T_REPORT_POPUPMENUBEARBEITEN,T_REPORT_POPUPMENUBEARBEITEN,0).OnClick
    := PopupMenuBearbeitenAusfuehren;
    pMenu.ItemByName(T_REPORT_POPUPMENUBEARBEITEN).MenuIndex :=
    pMenu.ItemByName(T_REPORT_POPUPMENUEDIT).MenuIndex;
    end
    else if FAktuellKomponente is tppMemo then begin
    pMenu.ItemByName(T_REPORT_POPUPMENULINES).Visible := False;

    pMenu.AddItem(0,T_REPORT_POPUPMENUBEARBEITEN,T_REPORT_POPUPMENUBEARBEITEN,0).OnClick
    := PopupMenuBearbeitenAusfuehren;
    pMenu.ItemByName(T_REPORT_POPUPMENUBEARBEITEN).MenuIndex :=
    pMenu.ItemByName(T_REPORT_POPUPMENULINES).MenuIndex;
    end
    else if FAktuellKomponente is TRotatedLabel then begin
    pMenu.ItemByName(T_REPORT_POPUPMENUANGLE).Caption :=
    T_REPORT_POPUPMENUDREHWINKEL;
    end
    else if FAktuellKomponente is TSimpleGrid then begin
    pMenu.ItemByName(T_REPORT_POPUPMENUCOLCOUNT).Caption :=
    T_REPORT_POPUPMENUANZAHLSPALTEN;
    pMenu.ItemByName(T_REPORT_POPUPMENUROWCOUNT).Caption :=
    T_REPORT_POPUPMENUANZAHLZEILEN;
    end
    else if FAktuellKomponente is tppCrossTab then begin
    pMenu.ItemByName(T_REPORT_POPUPMENUCONFIGURE).Caption :=
    T_REPORT_POPUPMENUKONFIGURIEREN;
    pMenu.ItemByName(T_REPORT_POPUPMENUDRAW).Caption :=
    T_REPORT_POPUPMENUZEICHNEN;
    end;
    end;
    except
    end;


    Nico Cizik (Digital Metaphors) schrieb:
  • edited December 2006
    Hi Bernhard,

    Yes, you will be able to load your 7.04 templates in RB 10.04 without
    problems. All templates are backward compatible. As far as we know,
    WPTools still works correctly with RB 10.04 as well. My suggestion would be
    to dowload a trial edition of RB 10.04 and test it out. Be sure you back up
    any templates you load in case you decide to stay with RB 7.04 however.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2007
    Is it possible to install in Delphi 7 both versions : 7.04 and 10.04?
    Best wishes
    Bernhard

    Nico Cizik (Digital Metaphors) schrieb:
  • edited January 2007
    Hi Bernhard,

    No it is not possible to install different versions of ReportBuilder for the
    same version of Delphi. If you decide to install RB 10.04, the version of
    7.04 will be automatically uninstalled.

    Note that it is possible however to have different versions of ReportBuilder
    on the same machine if they are installed with different versions of Delphi.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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