Delphi7中RAVE熟的老大,帮帮忙(有分)(300分)

  • 主题发起人 主题发起人 UFO001
  • 开始时间 开始时间
U

UFO001

Unregistered / Unconfirmed
GUEST, unregistred user!
谁对rave比较熟,帮帮忙,介绍一下,尽量详细一些,谢谢!
 
你想知道什么
 
可否讲解一下自定义报表预览界面的设计
 
Rave project -> yourrave.sav ->Rave Design tool ->
Your Form -> Rave Project 组件
Your Code -> RaveProject1.print(execute)
 
http://asp3.6to23.com/dever/dindex.asp
http://www.nevrona.com/rave/
 
Delphi7 的Rave的帮助讲的好得很!!
 
就是有乱码问题,大家碰到过吗,(打多行时)
 
为什么很像 FASTREPORT ?
 
有多少人在用了?
比FASTREPORT REPORTMACHINE两大报表高手如何?
 
Rave之Memo控件断行中文乱码问题的完美解决
delphi7所附Rave5之Memo控件,在中文一行不能打印完时能够自动断行,但不能按整字来断行,有时一个中文字会被截断,造成下行的混乱.
問題已經被我完美解決!請把RpMemo.pas文件中的TMemoBuf.GetLine函數進行如下的脩改。然后重新編譯RvCore.dpk包。把編譯獲得的RvCore50.bpl拷貝到Rave.exe對應的目錄即可!
function TMemoBuf.GetLine( Width: longint;
var Eol: boolean): string;
var
TestWidth: longint;
SavePos: longint;
NewWord: string;
S1: string;
S2: string;
StartPos: longint;
FormatState: TFormatState;
StartState: string;
AdjWidth: longint;
FirstLine: boolean;
//SCYANGYU ************** Start **************
Function CurLineEndHalfCHS(Const CurLineStr:String):Boolean;
Var
bIsDBCS:Boolean;
jLength,jFor:Integer;
begin
bIsDBCS := False;
jLength:=Length(CurLineStr);
for jFor := 1 to jLengthdo
begin
if bIsDBCS then
bIsDBCS := False
else
begin
if Windows.IsDBCSLeadByte(byte(CurLineStr[jFor])) then
bIsDBCS := True;
end;
end;
//end of for
Result:=bIsDBCS;
end;
//SCYANGYU ************** End **************
begin
{ GetLine }
{ Get a line of text that will fit within PrintStart to PrintEnd }
EOL := false;
NewLine := true;
StartPos := -1;
S1 := '';
S2 := '';
StartState := '';
Result := '';
FirstLine := NewParagraph;
AdjWidth := Width;
repeat
SavePos := FPos;
{ Save off current position}
NewWord := GetWord;
{ Get next word }
if StartPos < 0 then
begin
{ Initial run through }
StartPos := NonSpacePos;
if HasRPTF then

begin
{ Get state of line start }
FormatState := GetStateAtPos(SavePos);
StartState := StateToRPTF(FormatState);
if FirstLine then

begin
LeftIndent := FormatState.Para.FirstIndent + FormatState.Para.LeftIndent;
end
else

begin
LeftIndent := FormatState.Para.LeftIndent;
end;
{ else
}
RightIndent := FormatState.Para.RightIndent;
AdjWidth := Width - Round((LeftIndent + RightIndent) * BaseReport.XDPI);
if AdjWidth < BaseReport.XDPI then
begin
{do
n't allow width less than 1" }
AdjWidth := BaseReport.XDPI;
end;
{ if }
end;
{ if }
end;
{ if }
if (NewWord = #13) or (NewWord = '') then
begin
{ Finish off line }
EOL := true;
if Result = '' then
begin
Result := StartState;
end;
{ if }
Break;
end
else
begin
{ Test width with new word }
S2 := S2 + NewWord;
S1 := StartState + FillRPTF(S2,StartPos);
if System.Pos(RPTFPrefix,S1) = 0 then
begin

TestWidth := SimpleTextWidth(BaseReport,S1,0);
end
else
begin

TestWidth := RPTFTextWidth(BaseReport,S1);
end;
{ else
}
if TestWidth <= AdjWidth then
begin
{ Add new word }
Result := S1;
end
else
begin

{ Reset position to before this word}
FPos := SavePos;
end;
{ else
}
if TestWidth >= AdjWidth then
begin
if UnformatLen(Result) = 0 then
begin
{ First word was too long, cut itdo
wn }
repeat { Add on characters until enough width }
S1 := Result;
while FBuffer^[FPos] = RPTFPrefixdo

begin
{ Add on RPTF stuff }
repeat
S1 := S1 + FBuffer^[FPos];
Inc(FPos);
until FBuffer^[FPos] = RPTFSuffix;
S1 := S1 + FBuffer^[FPos];
Inc(FPos);
end;
{ while }
S1 := S1 + FBuffer^[FPos];
if System.Pos(RPTFPrefix,S1) = 0 then

begin

TestWidth := SimpleTextWidth(BaseReport,S1,0);
end
else
begin

TestWidth := RPTFTextWidth(BaseReport,S1);
end;
{ else
}
if TestWidth <= AdjWidth then
begin
if S1 = ' ' then
begin
Result := '';
end
else
begin
Result := S1;
end;
{ else
}
Inc(FPos);
end;
{ if }
until (TestWidth >= AdjWidth) or (FPos >= FSize);
end;
{ if }
Break;
end;
{ if }
end;
{ else
}
until false;
//SCYANGYU ************** Start **************
If CurLineEndHalfCHS(Result) then
begin
System.Delete(Result,Length(Result),1);
Dec(FPos);
end;
//SCYANGYU ************** End **************
end;
{ GetLine }

 
敢问兄台!在程序运行中,rave如何改变打印预览的方式(时按照横向还时按照纵向预览,以及预览的纸张大小的动态选定)?如何改变打印时的打印方式(时按照横向还时按照纵向打印,以及打印的纸张大小的动态选定)?
我在打印预览前的Output Options对话框中不论我怎么修改预览属性(设置预览方向、预览纸张),在预览时始终不起任何作用,这是为什么?如何解决这个问题,还望大侠能帮我这个忙,小弟感恩不尽!
我的Emain:jiexianjin@163.com,jiexianjin@hotmail.com
 
多看书,Delphi帮助挺好我从里面找了不少
 
后退
顶部