Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Impresión
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 22-09-2024
delphi50jmb delphi50jmb is offline
Miembro
 
Registrado: jul 2007
Posts: 39
Poder: 0
delphi50jmb Va por buen camino
Red face

Este es la estructura del reporte.

Código Delphi [-]
unit UQrDetDocVta;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Qrctrls, Db, QuickRpt, ExtCtrls;

type
  TFQrDetDocVta = class(TForm)
    QrDetDocVta: TQuickRep;
    QRBand2: TQRBand;
    QrBandDet: TQRBand;
    QRlNombEmpresa: TQRLabel;
    QRTitulo: TQRLabel;
    QRShape2: TQRShape;
    QRShape1: TQRShape;
    QrTipDoc: TQRLabel;
    QRPagina: TQRLabel;
    QRFecha: TQRLabel;
    QRBand1: TQRBand;
    QRShape3: TQRShape;
    QRHora: TQRLabel;
    QRSysHora: TQRSysData;
    QRLabel4: TQRLabel;
    QRMaxMinimo: TQRLabel;
    QrTotDoc: TQRLabel;
    QrNombre: TQRLabel;
    QRSysData1: TQRSysData;
    QRSysData2: TQRSysData;
    QrLabel1: TQRLabel;
    QrFecDoc: TQRLabel;
    QRLabel3: TQRLabel;
    QRGDetMes: TQRGroup;
    QRSubTotalMes: TQRBand;
    QrProveed: TQRLabel;
    qrNeto: TQRLabel;
    QRShape6: TQRShape;
    QRLabel2: TQRLabel;
    QrNumDoc: TQRLabel;
    QRLabel8: TQRLabel;
    QrCantDoc: TQRLabel;
    QrSubTitulo: TQRLabel;
    QrCodigo: TQRLabel;
    QRLabel7: TQRLabel;
    QRLabel5: TQRLabel;
    QrCostoDoc: TQRLabel;
    QRLabel9: TQRLabel;
    QrIva: TQRLabel;
    QrLabel20: TQRLabel;
    QrTotal: TQRLabel;
    QRLabel13: TQRLabel;
    procedure QrDetDocVtaBeforePrint(Sender: TCustomQuickRep;
      var PrintReport: Boolean);
    procedure QrBandDetBeforePrint(Sender: TQRCustomBand;
      var PrintBand: Boolean);
    procedure QrDetDocVtaStartPage(Sender: TCustomQuickRep);
    procedure FormActivate(Sender: TObject);

    procedure QRSubTotalMesBeforePrint(Sender: TQRCustomBand;
      var PrintBand: Boolean);

  private
    { Private declarations }

  public
    { Public declarations }
  end;

var
  FQrDetDocVta: TFQrDetDocVta;
  nPagina : Integer;
  iTTotal   : Extended;

implementation
uses UVarGlobales, ULibrerias, UDt1;

{$R *.DFM}



procedure TFQrDetDocVta.FormActivate(Sender: TObject);
begin
   nPagina :=0;
end;


procedure TFQrDetDocVta.QrDetDocVtaStartPage(Sender: TCustomQuickRep);
begin
   nPagina := nPagina + 1;
end;


procedure TFQrDetDocVta.QrDetDocVtaBeforePrint(Sender: TCustomQuickRep;
  var PrintReport: Boolean);

begin
   sMenuOpc := 'Informe Detallado de Ventas';

   QRlNombEmpresa.Caption := sEmpresa;
   QrTitulo.Caption := sMenuOpc;
   QrSubTitulo.Caption := '(' + 'Desde: ' + sParam1 + ' Hasta: ' + sParam2 + ')';

   QrDetDocVta.DataSet := SQL_String;
   QRSysHora.Data      := qrsTime;
end;


procedure TFQrDetDocVta.QrBandDetBeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
begin
   QrFecDoc.Caption   := SQL_String.FieldByName( 'FechaEmi'  ).AsString;
   QrTipDoc.Caption   := SQL_String.FieldByName( 'TipoDoc'  ).AsString;
   QrNumDoc.Caption   := SQL_String.FieldByName( 'Numero'  ).AsString;
   QrCodigo.Caption   := SQL_String.FieldByName( 'Codigo'  ).AsString;
   QrNombre.Caption   := SQL_String.FieldByName( 'Descrip'  ).AsString;
   QrCantDoc.Caption  := SQL_String.FieldByName( 'Cantidad' ).AsString;

   QrTotDoc.Caption   := Picture(SQL_String.FieldByName( 'TotalLinDe' ).AsString);

   itTotal := itTotal + StrToFloat(SQL_String.FieldByName( 'TotalLinDe' ).AsString);
end;



procedure TFQrDetDocVta.QRSubTotalMesBeforePrint(
  Sender: TQRCustomBand; var PrintBand: Boolean);          <------- Cuando entra aqui para subtotalizar por mes, se cae, y presenta el mensaje: "Operation not allowed on a unidirectional dataset".
begin
   QrTotal.Caption := FloatToStr(itTotal);
   itTotal := 0;
end;
end.

Gracias de antemano.
Saludos.
Jose Miguel B.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Reporte sin datos Nomad Impresión 3 25-09-2013 04:33:07
Reporte agrupando datos ingabraham Impresión 9 13-07-2011 15:20:35
reporte con varios datos ingabraham Impresión 0 14-10-2010 19:48:47
Mostrar datos en reporte natalinuyo Varios 3 22-03-2007 21:08:53
Actualizar datos de una base de datos en un reporte Marymania Impresión 4 27-11-2006 19:47:32


La franja horaria es GMT +2. Ahora son las 06:05:25.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi