Report doesn't fire frRepEnterRect event if launched in Design mode


<h3><details><summary>Original Reporter info from Mantis: <small>nachoap</small></summary><small>

- **Reporter name:** Nacho Asensio
</small></details></h3>

## Description:

Hi!

I've just updated my Lazarus from 1.0.14 to 1.2.0 (sourceforge version). 

If I launch my report with DesignReport and, from Lazreport I show the report, it does'n fire the frRepEnterRect event. If I simply change "DesignReport" and use "ShowReport" it fires this event (and works correctly).

It worked fine in previous versions, compiled with Lazarus 1.0.12, 1.0.10 and 1.0.14.

I'm working with this event in order to show some design images which varies with a database field value, but that isn't important. If I work with DesignReport it doesn't works and if I work with ShowReport it fires this event perfectly.

My code is this:

``` pascal
procedure TfRecetas.btListadoClick(Sender: TObject);
var iPos : Integer;
    sInforme : String;
begin
     with fInformes, fDatos do
     begin
          try
             qConsulta.Active := False;
             qConsulta.SQL.Clear;

             if MessageDlg('Mostrar informe', 
                           '¿Deseas mostrar el informe detallado?',
                           mtConfirmation, mbYesNo, 0) = mrYes then
             begin
                  sInforme := 'Fichas de recetas.lrf';
                  qConsulta.SQL.Text := zRecetas.SQL.Text;
             end
             else
             begin
                  sInforme := 'listado.lrf';

                  iPos := Pos('order by', zRecetas.SQL.Text);

                  if iPos > 0 then
                  begin
                       qConsulta.SQL.Text := 
                            Copy(zRecetas.SQL.Text, 1, iPos - 1);
                  end
                  else
                  begin
                       qConsulta.SQL.Text := zRecetas.SQL.Text;
                  end;

                  qConsulta.SQL.Add('order by CATEGORIA, NOMBRE');
             end;

             qConsulta.Active := True;

             frDS.DataSet := fDatos.qConsulta;
             frDS.DataSet.DisableControls;

             frRep.LoadFromFile(ExtractFilePath(ParamStr(0)) +
                 'INFORMES\' + sInforme);
             frRep.ShowReport; // ********** 

          except
                ShowMessage('No se pudo mostrar el listado');
          end;

     end;
end;           
```

## Steps to reproduce:

Write a program with two buttons who launchs a report with a TfrPictureView. Put a DesignReport in one of them, and a ShowReport in the other. Put 'Sample' in the memo text of TfrPictureView. Change EnterRect event in FReport in order to do something and place a breakpoint.

When you push ShowReport you go to the EnterRect breakpoint. When you push DesignReport and afterwards you push the "Eye" LazReport button (in order to show the report) Lazarus doesn't fire the EnterRect event.

## Additional information:

I'll send you a sample program. If I compile it with previous Lazarus it works fine, but with Lazarus 1.2.0 DesignReport has a bad work.

## Mantis conversion info:

- **Mantis ID:** 25896
- **OS:** Windows 7
- **OS Build:** x64
- **Build:** SVN 44303
- **Platform:** Win32
- **Version:** 1.2.0
- **Fixed in version:** 1.3 (SVN)
- **Fixed in revision:** 44281 (#5f2c42d8c1de757a84fa5faa24e0715572050a46)
- **Target version:** 1.2.4

Story points: 100.0