我定义了QRdbtext, 设置AutoStrech: True   却只打印一行,如何解决呢?   
                         WordWrap:   True
   我是新手,期待回答!谢谢!

解决方案 »

  1.   

    QRRichText换行不换页,且数据库字符串字段我不知如何赋值到QRRichText中,
    哪位高手救救急!
    我如果用QRdbtext,在其中加入回车符,那么扩展到第二页时,它会从纸张的半当中
    开始打印(因为我的这一个字段是报表中的最后一个字段,在第一页中处于页中位置)
      

  2.   

    这里对你应有帮助的,
      我现不用QR,用FR了。
        http://www.delphibbs.com/delphibbs/dispq.asp?lid=620364
      

  3.   

    谢谢scater, 我将拭着解决!
      

  4.   

    在QRdbtextonprint事件中写OnPrint_Event(sender: TObject; var Value: String);
    var
      iLen, iWidth: integer;
      strSource, strTemp : string;  //sAddchar
    begin  iWidth := Round(Tcontrol(sender).Width / iWidthP);
      if Length(Value) <= iWidth then exit;  strSource := Value;
      Value     := '';          //sAddchar  := ''; sAddchar  := sEnter_Key;  //·&Agrave;&Ouml;&sup1;&frac12;&Oslash;&para;&Iuml;&ordm;&ordm;×&Ouml;&iexcl;&pound;
      while true do
      begin
        iLen := 1;    while iLen < iWidth do
        begin
          if ord(strSource[iLen]) > 128 then
            inc(iLen, 2)
          else
            Inc(iLen);
        end;    Dec(iLen);    strTemp := Copy(strSource, 1, iLen);    //加回车
        if Value = '' then
          Value := strTemp
        else
          Value := Value + #13 + strTemp;
        strSource := Copy(strSource, iLen + 1, Length(strSource) - iLen);    if Length(strSource) <= iWidth then
        begin
          Value := Value + #13 + strSource;
          exit;
        end;
      end;end;