Numeração n/n no QuickRep

Delphi

08/04/2003

Aroldo o código q vc postou a respeito da numeração da página no quickreport, eu já tinha usado e não tinha dado certo.. por isso q coloquei a minha mensagem no forum..

Coloquei esse 1º código no onshow do meu form:
QuickRep1.Prepare; // Roda o relatório
cPagina := qrsysdata1.Caption;
QuickRep1.PreviewModal;

E esse coloquei no onprint do Qrsysdata...
Value := ´Página: ´ + Value +´/´+cPagina;

O que estou fazendo de errado???

Obrigado


Rafaela

Título editado conforme pedido do Zanela
Zoom


Rafaela

Rafaela

Curtidas 0

Respostas

Anonymous

Anonymous

08/04/2003

Só um minuto que vou te mandar o exemplo completo.

[]´s
AZ.


GOSTEI 0
Rafaela

Rafaela

08/04/2003

Obrigado !!!

Estou esperando!!


GOSTEI 0
Zoom

Zoom

08/04/2003

Favor não postar mais de uma vez a mesma mensagem. A segunda está sendo excluída.
Uma sugestão : Quando quiser enviar uma mensagem direcionada a alguém use as mp´s ( o botão está pm) que a msg irá apenas à pessoa escolhida.
Agredeço a compreensão.

zoom


GOSTEI 0
Anonymous

Anonymous

08/04/2003

Obrigado !!! Estou esperando!!


Rafaela,

Não funciona em tempo de design, por isso fiz o exemplo sendo disparado no OnCreate do form:

var
  Form1: TForm1;
  nPagina: Integer;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin
QuickRep1.Prepare;
  nPagina := StrToInt(QRSysData1.Caption);
QuickRep1.PreviewModal;
end;

procedure TForm1.QRSysData1Print(sender: TObject; var Value: String);
begin
  value := Value +´/´+IntToStr(nPagina);
end;


Se quiser reproduzir o teste que fiz, use o DFM abaixo:

  object QuickRep1: TQuickRep
    Left = 238
    Top = 62
    Width = 816
    Height = 1056
    Frame.Color = clBlack
    Frame.DrawTop = False
    Frame.DrawBottom = False
    Frame.DrawLeft = False
    Frame.DrawRight = False
    DataSet = Table1
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = ´Arial´
    Font.Style = []
    Functions.Strings = (
      ´PAGENUMBER´
      ´COLUMNNUMBER´
      ´REPORTTITLE´)
    Functions.DATA = (
      ´0´
      ´0´
      3939)
    Options = [FirstPageHeader, LastPageFooter]
    Page.Columns = 1
    Page.Orientation = poPortrait
    Page.PaperSize = Letter
    Page.Values = (
      100
      2794
      100
      2159
      100
      100
      0)
    PrinterSettings.Copies = 1
    PrinterSettings.Duplex = False
    PrinterSettings.FirstPage = 0
    PrinterSettings.LastPage = 0
    PrinterSettings.OutputBin = Auto
    PrintIfEmpty = True
    SnapToGrid = True
    Units = MM
    Zoom = 100
    object DetailBand1: TQRBand
      Left = 38
      Top = 38
      Width = 740
      Height = 40
      Frame.Color = clBlack
      Frame.DrawTop = False
      Frame.DrawBottom = False
      Frame.DrawLeft = False
      Frame.DrawRight = False
      AlignToBottom = False
      Color = clWhite
      ForceNewColumn = False
      ForceNewPage = False
      Size.Values = (
        105.833333333333
        1957.91666666667)
      BandType = rbDetail
      object QRDBText1: TQRDBText
        Left = 42
        Top = 14
        Width = 49
        Height = 17
        Frame.Color = clBlack
        Frame.DrawTop = False
        Frame.DrawBottom = False
        Frame.DrawLeft = False
        Frame.DrawRight = False
        Size.Values = (
          44.9791666666667
          111.125
          37.0416666666667
          129.645833333333)
        Alignment = taLeftJustify
        AlignToBand = False
        AutoSize = True
        AutoStretch = False
        Color = clWhite
        DataSet = Table1
        DataField = ´OrderNo´
        Transparent = False
        WordWrap = True
        FontSize = 10
      end
    end
    object PageFooterBand1: TQRBand
      Left = 38
      Top = 78
      Width = 740
      Height = 40
      Frame.Color = clBlack
      Frame.DrawTop = False
      Frame.DrawBottom = False
      Frame.DrawLeft = False
      Frame.DrawRight = False
      AlignToBottom = False
      Color = clWhite
      ForceNewColumn = False
      ForceNewPage = False
      Size.Values = (
        105.833333333333
        1957.91666666667)
      BandType = rbPageFooter
      object QRSysData1: TQRSysData
        Left = 302
        Top = 8
        Width = 15
        Height = 17
        Frame.Color = clBlack
        Frame.DrawTop = False
        Frame.DrawBottom = False
        Frame.DrawLeft = False
        Frame.DrawRight = False
        Size.Values = (
          44.9791666666667
          799.041666666667
          21.1666666666667
          39.6875)
        Alignment = taLeftJustify
        AlignToBand = False
        AutoSize = True
        Color = clWhite
        Data = qrsPageNumber
        OnPrint = QRSysData1Print
        Transparent = False
        FontSize = 10
      end
    end
  end
  object Table1: TTable
    Active = True
    DatabaseName = ´DBDEMOS´
    TableName = ´items.DB´
    Left = 66
    Top = 38
  end


[]´s
AZ.


GOSTEI 0
Aroldo Zanela

Aroldo Zanela

08/04/2003

Zoom,

Por gentileza, mude o tópico para ´Numeração n/n no QuickRep´ em face do assunto poder ser utilizado por demais interessado.

Sorry!


GOSTEI 0
POSTAR