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

Running ppExplorer in Frames code breaker has finally hit!

edited March 2006 in General
In the past versions I have been happily running the report explorer in a
frame under the application framework, even under 10.1 this maginc seemed to
work. Now with the update to 10.2 it has finally been squashed and my code
(simple though it was) has been broken.

Thoroughly.

I now have a irate client hopping up and down with rage in front of me
asking why the report explorer suddenly appears in a floating window over
the rest of the application.

I can only show him the excerpt in the 10.2 release notes and have tried to
explain the technical reasoning behind this change. I can't however make it
sound any more convincing because I can't myself believe that what was
working well has suddenly been retarded and not actually improved.

Since there must be more RB users making use of an application framework
where each module will be activated in a frame is there a substantial reason
why this hasn't been developed further rather than moving back in time and
assuming that we are dealing with one application = one form type work?

Is there a possible work around here? I'm tending to side with my client
here - I can't justify to him why the change has seemed to have taken place
after all this time.

Please - I really need to allow the report explorer to be accessible from
within a frame.

with best regards - David

Comments

  • edited March 2006

    I researched this and had to patch the RB 10.02 code slightly. I will email
    you the patch .

    There are timing issues to related to initializing the report explorer -
    that is the biggest challenge I encountered in getting this to work.

    - with the patched code, it is possible to configure the report explorer
    form in the Frame.OnCreate event.
    - the TFrame does not have an OnShow event, so I used the OnEnter event to
    call the ReportExplorer.Execute method. There might be a better approach,
    but it seemed to work in my testing here.

    For the TppDesigner, there is a new ShowInPanel method that you can use.
    Pass the Frame or Panel to this method.



    Example
    ---------

    constructor TRBExplorerFrame.Create(Owner: TComponent);
    begin

    inherited;

    ppReportExplorer1.Form.Parent := Self;
    ppReportExplorer1.Form.BorderStyle := bsNone;
    ppReportExplorer1.Form.Align := alClient;
    ppReportExplorer1.ModalForm := False;

    end;

    procedure TRBExplorerFrame.FrameEnter(Sender: TObject);
    begin

    if (ppReportExplorer1.Form <> nil) and not(ppReportExplorer1.Form.Visible)
    then
    ppReportExplorer1.Execute;

    end;











    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2006
    Thanks Nard - it arrived OK and I've replied by separate email. I'm truly
    grateful for your superb support and speedy response on this one!

    with best wishes - David

  • edited March 2006
    Update: many many thanks - it worked with the original code first time - I
    had adopted the approach where the explorer, designer, dictionary and
    pipelines are defined and maintained in a separate form. The Report
    Explorer's own form is then linked back to the frame's panel which then
    takes over.

    Is it my imagination or does the code seem more responsive - the explorer
    and all associated components seem to be punchier and friskier than in
    previous versions.

    Big smile from the user - kudos to Digital-Metaphors,

    with best wishes,

    David

This discussion has been closed.