PDA

Ver la Versión Completa : QReport: Impresion diferente a la visualización


jmlifi
15-12-2005, 10:28:05
El QReport me visualiza una información (es correcta), pero a la hora de imprimir me saca información diferente.

Me visualiza(correcto):

PACKING LIST 8
ALBARAN: 8
KIT: GP016393 0.1
KENAZEN
GP011685 CONDUCTOR
1018555 PLATFORM
VARIOS
1736525 BRACKETS FOR EARTHING CONDUCTOR
1736600 BENDED BRACKET PLATFORM
1736601 BRACKETS FOR LADDER
736144 SOPORTE SEGURIDAD
726083 BRACKET F. GALLERY, TOPSEC.V66

Me Imprime:

PACKING LIST 8
ALBARAN: 8
KIT: GP016393 0.1
KENAZEN
1736525 BRACKETS FOR EARTHING CONDUCTOR
1736600 BENDED BRACKET PLATFORM
1736601 BRACKETS FOR LADDER
736144 SOPORTE SEGURIDAD
726083 BRACKET F. GALLERY, TOPSEC.V66
VARIOS
1736525 BRACKETS FOR EARTHING CONDUCTOR
1736600 BENDED BRACKET PLATFORM
1736601 BRACKETS FOR LADDER
736144 SOPORTE SEGURIDAD
726083 BRACKET F. GALLERY, TOPSEC.V66

Tengo un formulario(report) y algunos componentes son los siguientes: componentes:
tblProveedores: TSQLQuery;
tblPackingList: TSQLQuery;
QR: TQuickRep;
DetailBand1: TQRBand;
QRSubDetail1: TQRSubDetail;
PageHeaderBand1: TQRBand;

QR.dataset = tblProveedores

DetailBand1.BandType = rbGroupHeader
DetailBand1.LinkBand = QRSubDetail1

QRSubDetail1.HeaderBand = DetailBand1

Procedimiento:

procedure TLstAdministracionFrm.Ejecuta(const alba: Integer; const kiti: String; const codpack: integer);
begin
albaran.Caption := IntToStr(alba);
kit.caption := kiti;
tblProveedores.ParamByName('codpack').AsInteger := codpack;
tblProveedores.Open;
tblproveedores.First;
while not tblproveedores.Eof do begin
tblPackingList.ParamByName('proveedor').AsString := tblproveedoresPROVEEDOR.AsString;
tblPackingList.ParamByName('codpack').AsInteger := codpack;
tblPackingList.Open;
tblproveedores.Next;
end;
if not tblPackingList.IsEmpty then
cod.Caption := IntToStr(codpack);
end;

¿Cual puede ser la solución?

pepon386
15-12-2005, 11:52:01
Está un poco embarullado tu código, pero por lo que veo no cierras en ningún momento las tablas. Si no las cierras, por mucho que modifiques los parámetros no refresca la información.

jachguate
15-12-2005, 15:50:49
Hola.

Este hilo resulta dificil de leer debido a la falta de uso de las etiquetas [delphi], [sql] o [code] (según corresponda).

Dado que ya llevas varios meses registrado(a) en los foros, supongo que no es la primera vez que escuchas de ellas, por lo que te invito a editar tu mensaje e incluirlas.

Hasta luego.

samantha jones
15-12-2005, 17:31:38
Con QuickReport cuando me ha salido la impresión diferente a la previsualización es porque no tome en cuenta que al mandar a imprimir se vuelve a ejecutar todo el "codigo del reporte", es decir, hay que poner un reinicializador de variables generalmente en el evento beforeprint del QuickReport....

Saludos