您的位置:程序门 -> delphi -> 非技术区



有关打印预览的问题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


有关打印预览的问题
发表于:2007-06-13 14:49:59 楼主
初学者请教!
使用quickreport打印预览dbgrid中所查找的数据.打印预览第一页正常,按 "下一页 "键页面不动,问题出在哪?请高手多指点

procedure   tsfgl_form.printshowclick(sender:tobject);
begin
      adoquery1.first;
      recordindex:=1; //recordindex为unit变量

          while   not   adoquery1.eof   do
          begin

                      if   recordindex> 2   then
                            break;

                      (findcomponent( 'bh '+inttostr(recordindex))   as   tqrlabel).caption:=adoquery1.fieldbyname( 'bh ').asstring;

                      recordindex:=recordindex+1;
                      adoquery1.next;
          end;
          while   recordindex <2   do
          begin

                  (findcomponent( 'bh '+inttostr(recordindex))   as   tqrlabel).caption:= ' ';

              recordindex:=recordindex+1;
          end;
          printtest.quickrep1.preview;

end;


快速检索

最新资讯
热门点击