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

Hiding the last accessed reports in the designer

edited March 2006 in End User
Dear Sir,

Would it be possible to hide the last accessed reports in the file menu
from the Report Designer? The reason is the following:

In our program the end user reports are created dynamic. Depending on the
part/status/action of the program some reports can be used and others not.
Or even the data for the report is filtered in a different way, or other
fields are visible. The problem with the last accessed reports in the file
menu is that it can produce in our situation errors if a user selects a
report from the list which he is not allowed to, or the dataset is not
applicable at that moment. Therefore the question if this last accessed
reports from the file menu can be hidded or disabled. That would be a
great hep for us.

Kind regards



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited March 2006
    Hello,

    You can use the Designer.Menu property to access an customize the main menu
    of the designer window at runtime.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    Hi,

    One other note, the amount of "last accessed" reports shown in the designer
    is defined in the RBuilder.ini file located in your Windows\System32\
    directory. Changing the "Max" entry to 0 in the [Last Reports Accessed]
    section should remove these entries from the menu.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2006
    Just in case someone is interested, this is the way we solved this, by
    deleting the TppTBXMRUListItem object.

    // Remove the last accessed reports from the menu:
    for i := 0 to aReportDesigner.Menu.Items.Items[FileMenu].Count - 1 do
    begin
    if aReportDesigner.Menu.Items.Items[FileMenu].Items[i].ClassName =
    'TppTBXMRUListItem' then
    begin
    aReportDesigner.Menu.Items.Items[FileMenu].Delete(i);
    end;
    end;



    --- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.