如何在打印时做到"第m页/共n页"的形式?我用的是quickreport如下:
myprnt.qr.prepare;
myprnt.qr.qrlabel1.caption:=inttostr(myprnt.qr.pagenumber)+'/'+inttostr(myprnt.qr.printer.pagecount);
myprnt.qr.preview;
结果,无论有多少页,两个数始终都是一样大!不知为什么?

解决方案 »

  1.   

    quickreport没用过,fastreport实现倒很简单。(不是不帮忙,需要fastreport可以找我)
      

  2.   

    我做过。
    代码如下:
      QuickRep1.Prepare ;
      QrLabel18.Caption := IntToStr(QuickRep1.QRPrinter.PageCount);
      QuickRep1.QRPrinter.Free ;
      QuickRep1.QRPrinter :=Nil; 
      QuickRep1.Preview ;其中,QrLabel18显示的是总页数,然后在增加一个QRSysData1,它的Data属性设置为qrsPageNumber,显示的是当前页,这样就OK了。
    解决了问题别忘记给分哦!^Q^
      

  3.   

    myprnt.qr.pagenumber 和 myprnt.qr.printer.pagecount都是取页数啊!