Hola amigos,
Una ayudadita a este novato servidor, el problema es el sgte.
Tengo 4 reportes (probados de manera independiente funcionan correctamente), estos 4 los tengo agregado a un CompositeReport, funciona de maravilla "la 1ra vez", al cerrar el reporte me muestra el mensaje "external exception C00000D" , y cuando intento acceder nuevamente al reporte me muestra el clasico mensaje "Access violation adrres at ##### in modul
#### Red Adrres 00000". Tengo que cerrar la aplicacion y volver abrir para poder ver el reporte nuevamente.
Ya toy varios dias bregando con esta vaina y consultando en el foro no encontrando el remedio necesario, asi que recurro a ustedes.
Pienso que quizas no este llamando correctamente al reporte o liberando la memoria correctamente, ustedes diran, de antemado gracias, ahi les pongo el codigo:
Código Delphi
[-]
try
frRep1 := TfrRep1.Create(Application);
frRep2 := TfrRep2.Create(Application);
frRep3 := TfrRep3.Create(Application);
frRep4 := TfrRep4.Create(Application);
with frRep1.t1 do begin
Active := False;
Params.ParamByName('xIdRegistro').AsInteger := IdRegistro ;
Params.ParamByName('xIdEmp').AsString := IdEmp ;
Active := True;
end;
with frRep4.t1 do begin
Active := False;
Params.ParamByName('xIdRegistro').AsInteger := IdRegistro ;
Params.ParamByName('xIdEmp').AsString := IdEmp ;
Active := True;
end;
with frRep2.t1 do begin
Active := False;
Params.ParamByName('xIdRegistro').AsInteger := IdRegistro ;
Params.ParamByName('xIdEmp').AsString := IdEmp ;
Active := True;
end;
with frRep3.t1 do begin
Active := False;
Params.ParamByName('xIdRegistro').AsInteger := IdRegistro ;
Params.ParamByName('xIdEmp').AsString := IdEmp ;
Active := True;
end;
QR1.Preview;
frRep1.t1.Active := False;
frRep2.t1.Active := False;
frRep3.t1.Active := False;
frRep4.t1.Active := False;
frRep1.Destroy;
frRep2.Destroy;
frRep3.Destroy;
frRep4.Destroy;
qr1.Free ;
qr1.Destroy ; except
frRep1.Destroy;
frRep2.Destroy;
frRep4.Destroy;
frRep3.Destroy;
qr1.Free ;
qr1.Destroy ;
end;
end;
procedure TfrmPrincipal.QR1AddReports(Sender: TObject);
begin
QR1.Reports.Add( frRep1 );
QR1.Reports.Add( frRep2 );
QR1.Reports.Add( frRep3 );
QR1.Reports.Add( frRep4 );
end;
Nota : Uso D7 y QREPORT 4.
De antemano mil gracias.