Grouping Fields
Hi my friends
for easy andrestand for you look at this sample:
Class
Lesson---Grade
First
A
68
First
B
100
First
C
72
Second--- A
80
Second----C
93
Ok, Now I want show my report like this shown:
Class
Lesson---Grade
A
68
First
B
100
C
72
Second--- A
80
C
93
I used this code:
Notes:
1. I would not using "Group Header"
2. I use Cross Table but not support RTL(Right To Left)!
Please help me
Regaurds
for easy andrestand for you look at this sample:
Class
Lesson---Grade
First
A
68
First
B
100
First
C
72
Second--- A
80
Second----C
93
Ok, Now I want show my report like this shown:
Class
Lesson---Grade
A
68
First
B
100
C
72
Second--- A
80
C
93
I used this code:
  private
    s: string;
    cl: TColor;
//-----------------------------------------------
procedure TForm1.frxDBDataSet1First(Sender: TObject);
var
  Memo: TfrxMemoView;
begin
  s := frxDBDataSet1.DataSet.FieldByName('ClsName').AsString;
  Memo := frxDBDataSet1.FindObject('Memo1') as TfrxMemoView;
  Memo.Frame.Typ := [ftTop, ftLeft, ftRight];
  cl := Memo.Font.Color;
end;
procedure TForm1.frxDBDataSet1Next(Sender: TObject);
var
  Memo: TfrxMemoView;
begin
  Memo := frxDBDataSet1.FindObject('Memo1') as TfrxMemoView;
  if s <> frxDBDataSet1.DataSet.FieldByName('ClsName').AsString then begin
    Memo.Frame.Typ := [ftTop, ftLeft, ftRight];
    Memo.Font.Color := cl;
    s := frxDBDataSet1.DataSet.FieldByName('ClsName').AsString;
  end else begin
    if frxDBDataSet1.DataSet.Eof then
      Memo.Frame.Typ := [ftLeft, ftRight, ftBottom]
    else
      Memo.Frame.Typ := [ftLeft, ftRight];
    Memo.Font.Color := Memo.Color;
  end;
end;
Notes:
1. I would not using "Group Header"
2. I use Cross Table but not support RTL(Right To Left)!
Please help me
Regaurds
Comments
with 2 ADOQuery using master data and parameter parsing to another ADOQuery
I helped with this
http://www.fast-report.com/pbc_download/FR...erManual-en.chm