fastreport打印问题?(200分)

  • 主题发起人 主题发起人 0008
  • 开始时间 开始时间
0

0008

Unregistered / Unconfirmed
GUEST, unregistred user!
在预览界面中出现乱码?又谁知道怎么解决?
急阿,要不这一个多月地心血就白费了。。呜呜。。
 
字体调调,大小调调,要不,你是用不同的版本的fr编辑的?
 
[:)]我增加了列宽度,就好了,
但问题是这列数据比较长,我希望能折行显示,
但一折行就有问题了!
 
wordwrap := true;
 
0008, 你要碰到折行,可就麻烦了。
 
你的FR_CLASS.PAS修改过了吗
如没改过,我可以给你改后的文件
 
procedure WrapLine(const s:String);
将fr_class.pas里的此过程用下面代码替换
procedure WrapLine(const s:wideString);
var
i, cur, beg, last, LoopPos: Integer;
WasBreak, CRLF: Boolean;
s1:string;
begin
CRLF := False;
LoopPos := 0;
s1:=s;
for i := 1 to Length(s1)do
if s1 in [#10, #13] then
begin
CRLF := True;
break;
end;
last := 1;
beg := 1;
if not CRLF and ((Length(s) <= 1) or (WCanvas.TextWidth(s) <= maxwidth)) then
OutLine(s + #1)
else
begin
cur := 1;
while cur <= Length(s)do
begin
if s1[cur] in [#10, #13] then
begin
OutLine(Copy(s1, beg, cur - beg) + #1);
while (cur < Length(s1)) and (s1[cur] in [#10, #13])do
Inc(cur);
beg := cur;
last := beg;
if s1[cur] in [#13, #10] then
Exit else
continue;
end;
if s[cur] <> ' ' then
if WCanvas.TextWidth(Copy(s, beg, cur - beg + 1)) > maxwidth then
begin
WasBreak := False;
if (Flags and flWordBreak) <> 0 then
begin
i := cur;
while (i <= Length(s1)) and not (s1 in spaces)do
Inc(i);
b := BreakWord(Copy(s, last + 1, i - last - 1));
if Length(b) > 0 then
begin
i := 1;
cur := last;
while (i <= Length(b)) and
(WCanvas.TextWidth(Copy(s, beg, last - beg + 1 + Ord(b)) + '-') <= maxwidth)do
begin
WasBreak := True;
cur := last + Ord(b);
Inc(i);
end;
last := cur;
end;
end
else
if last = beg then
last := cur;
if WasBreak then
OutLine(Copy(s, beg, last - beg + 1) + '-')
else
if s[last] = ' ' then
OutLine(Copy(s, beg, last - beg)) else
OutLine(Copy(s, beg, last - beg + 1));
if ((Flags and flWordBreak) <> 0) and not WasBreak and (last = cur) then
if LoopPos = cur then
begin
beg := cur + 1;
cur := Length(s);
break;
end
else
LoopPos := cur;
beg := last + 1;
last := beg;
end;
// if s[cur] in spaces then
last := cur;
if s[cur] = ' ' then
last := cur;
Inc(cur);
end;
if beg <> cur then
OutLine(Copy(s, beg, cur - beg + 1) + #1);
end;
end;
 
lanbing1400,我想知道是怎么一回事?
你发到我的信箱fengyx@butone,com
thanks!
 
不好意思,看到了
 
816,谈谈你的看法?!好像比较夸张阿?
 
我现把分给了!大家可以在讨论讨论!
 

Similar threads

回复
0
查看
848
不得闲
D
回复
0
查看
867
DelphiTeacher的专栏
D
D
回复
0
查看
836
DelphiTeacher的专栏
D
D
回复
0
查看
785
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
后退
顶部