1、当某一记录的某一个字段值(ChengJi)满足某一条件时动态设置这条件记录的前景色(TQRShape.Font.Color)或背影色(TQRShape.Brush.Color)?
2、如何获得打印机正在打印的页码及共计页数,还有打印机的打印进度?我用TQuickRep做报表,因为报表比较多,先前已做好,现在耍要解决的就这两个问题,所以不想也来不及再改用其它控件了。谢谢帮忙!

解决方案 »

  1.   

    不好意思我用fastreport,这个很傻瓜。
    UP
      

  2.   

    不过关于页数可能做一父窗体在 OnPreview 时把父窗体赋值给它,在父窗体可获得。
      

  3.   

    www.qusoft.com
    你先去官方网站看看
      

  4.   

    如何获得打印机正在打印的页码及共计页数
    这个应该可以解决
    Q. How can I create a report with a Title band to print ABOVE the Page Header band?A. The print order of the bands is fixed, you can not print a title band above the page header. One work around would be to use a child band with the page header. Put the page header information on the child band and place the title information on the actual page header band. In the Page Header band's BeforePrint event, set PrintBand to false when the report's PageNumber property is greater than 1.
      

  5.   

    有支持D7的FastReport吗?
    在哪里下,请给我连接吧,谢谢!
      

  6.   

    www.delphibox.com
    www.delphifans.ocm
      

  7.   

    http://www.delphibox.com/article.asp?articleid=1110
      

  8.   

    我先强调一下,说用QUICKREP笨的那位兄弟肯定也好不到哪里.QUICKREP本来就是一个很不错的工具,只是楼上的那位不会用而以.问题的回答:
    1、你可以在对应的BAND的ONBEFOREPRINT事件中加上你所要的判断语言,然后来更改颜色。
    2、打印页码也是可以从系统获得的,有一个函数。但打印机的进度可以是没有办法去控制的,如果要控制肯定会用到WINDOWS的底层消息,不过我相信,楼上用RAVE的那位肯定也不会,因为RAVE还是个试用品,一点都不好用,如果做很漂亮的REPORT的话,我还是推荐用QUICKREP。楼主如有不明可以给我发信息,或发邮件:[email protected]
      

  9.   

    、当某一记录的某一个字段值(ChengJi)满足某一条件时动态设置这条件记录的前景色(TQRShape.Font.Color)或背影色(TQRShape.Brush.Color)?
    // 在DetailBand的BeforePrint事件中控制
       if 条件成立 then
          QrShape1.Brush.Color:=xxxx
       else
          QrShape1.Brush.Color:=xxxx
      
    2、如何获得打印机正在打印的页码及共计页数,还有打印机的打印进度?
      QuickRep1.Prepare;
      QuickRep1.QRPrinter.PageNumber;
      QuickRep1.QRPrinter.PageCount;
      QuickRep1.QRPrinter.Progress;
      //试试看
      

  10.   

    唉,都试过了不得行哟,我在OnNeedData事件写了代码,但根本就没触发该事件,不知道是怎么回事
      

  11.   

    我用REPORT MACHINE可以满足你的第一个要求,可你又不能换控件,只能帮你up了
      

  12.   

    有没有搞错呀!!我测试过的,可行呀.发你的程序给我看看[email protected]
      

  13.   

    关于报表打印的问题:这是我程序的代码,希望对你 有帮助:
    //总页数
    procedure TForm5.QRPreview1PageAvailable(Sender: TObject;
      PageNum: Integer);
    begin
      pgcount:=pagenum;
    end;
    //上一页
    procedure TForm5.ToolButton2Click(Sender: TObject);
    begin
      if qrpreview1.PageNumber > 1 then
      qrpreview1.PageNumber:=qrpreview1.PageNumber-1;
    end;
    //下一页
    procedure TForm5.ToolButton3Click(Sender: TObject);
    begin
      if qrpreview1.PageNumber < pgcount then
      qrpreview1.PageNumber:=qrpreview1.PageNumber+1;end;
    //第一页
    procedure TForm5.ToolButton1Click(Sender: TObject);
    begin
      qrpreview1.PageNumber:=1;
    end;
    //最后一页