PAGUE 6 MESES
LEVE 12 MESES
GARANTIR DESCONTO

Fórum quick report limitando preview de registros! ajuda! #396612

03/03/2011

0

pessoal fix uma aplicação em delphi, utilizando o velho quick report, mas ta acontencendo um problema que ta me tirando o sono, quando chega a uma certa quantidade de registros para ser impresso e é mostrado na tela ele simplesmente fecha o sistema e apresenta o seguinte abaixo:



segue o meu codigo dentro do relatorio do quickreport, se alguem puder me audar agradeço mesmo.

unit unQRRelatorioPadrao;
interface
uses Windows, SysUtils, Messages, Classes, Graphics, Controls,  StdCtrls, ExtCtrls, Forms, QuickRpt,DBGRIDS, QRCtrls, QRExport;
type  TqrRelatorioPadrao = class(TQuickRep)    QRBand1: TQRBand;    QRBand2: TQRBand;    QRBand3: TQRBand;    QRLabel1: TQRLabel;    QRSysData1: TQRSysData;    TitleBand1: TQRBand;    PageFooterBand1: TQRBand;    QRShape1: TQRShape;    QRShape2: TQRShape;    QRSysData2: TQRSysData;  private
  public  Class procedure PrintDBGrid(ADBGRid :TDBGrid ; Nome_Relatorio:string);
  end;
var  qrRelatorioPadrao: TqrRelatorioPadrao;
implementation
{$R *.DFM}
{ TQuickReport1 }
class procedure TqrRelatorioPadrao.PrintDBGrid(ADBGRid: TDBGrid;  Nome_Relatorio: string);vari, posi: Integer;col: TQRLabel;fld: TQRDBText;beginposi := 0;qrRelatorioPadrao := TqrRelatorioPadrao.Create(nil);//qrRelatorioPadrao.QRLabel2.Caption := Nome_Relatorio;with qrRelatorioPadrao dobeginDataSet := ADBGrid.DataSource.DataSet;for i := 0 to Pred(ADBGrid.columns.Count) dobegin// Cabeçalho das Colunascol := TQRLabel.Create(qrRelatorioPadrao);col.Parent := qrRelatorioPadrao.QRBand2;col.Caption := ADBGrid.Columns[i].Title.Caption;col.Top := 4;col.Left := posi;// Linhas de detalhesfld := TQRDBText.Create(qrRelatorioPadrao);fld.Parent := qrRelatorioPadrao.QRBand3;fld.DataSet := DataSet;fld.DataField := ADBGrid.Columns[i].Field.FieldName;fld.Top := 1;   //alterado josinaldofld.Left := posi;posi := posi + ADBGrid.Columns[i].Width + 25;end;Preview;end;end;
end.
Josinaldo

Josinaldo

Responder

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar