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

Easier solution to MDI Report Explorer

edited June 2003 in End User
I have seen a solution to making the Report Explorer an MDI child where it
used a timer and some other tricks (hacks in my opinion) to get it working
(http://www.digital-metaphors.com/tips/ReportExplorerAsMDIChild.zip). Maybe
this has been done in RB7, but I found that changing code in ppRptExp made
the explorer form follow the setting of the FormStyle property. It seems
that this is a bug in 6.03 at least, because why surface the FormStyle
property if it doesn't do anything?

-Jim



procedure TppFormWrapper.PropertiesToForm;
var
lForm: TForm;
begin

lForm := GetForm;

if (lForm = nil) then Exit;

if (csDesigning in ComponentState) then Exit;

lForm.Caption := FFormCaption;
lForm.Icon := FFormIcon;
lForm.FormStyle := FFormStyle; //****** Added this line

if not(TppCustomReportExplorer(lForm).FormSettingsRemembered) then
begin
lForm.WindowState := FFormState;
lForm.Position := FFormPosition;

lForm.Height := FFormHeight;
lForm.Left := FFormLeft;
lForm.Top := FFormTop;
lForm.Width := FFormWidth;
end;

lForm.Tag := FFormTag;

{pass-thru events}
lForm.OnActivate := FOnActivate;
lForm.OnClose := FOnClose;
lForm.OnCloseQuery := FOnCloseQuery;
lForm.OnDeactivate := FOnDeactivate;
lForm.OnHide := FOnHide;
lForm.OnResize := FOnResize;
lForm.OnShow := FOnShow;

end; {procedure, PropertiesToForm}

Comments

  • edited June 2003
    In the past, simply setting the formstyle did not help when you want to show
    the report explorer in an MDI app. What version of Delphi are you using? Did
    you have to make any other changes to our source? Perhaps there is a Delphi
    update that fixed the problem we were running into, which we weren't aware
    of?

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2003
    That is the only place I changed that I can see with a diff. I have D6 sp2
    and RB 6.03 Pro. I have since also added:

    lForm.WindowState := FFormState;

    right below the other line I added, so that I can get the window state to
    work also. I am sending a demo app for you to look at.

    -Jim


This discussion has been closed.