Printing fix number of records in QuickReport

Dear All,

I've developing an application that uses QuickReport for printing reports from an Access database.
In this particular case the report page contains 3 tables, the first contains one record, the second contains four, and the last contains 10. So every page of the report must be like that.

The tables of the database are connected with a common field.

Could anybody tell me how could I do it? (A few days ago I got an idea, that I should use different Bands, make ClientDataSets, and copy the displayable records to the ClientDataSet.

So the code for the idea what I got:
------------
CD: TClientDataSet;
T: TTable;
...

procedure TMyForm.FillClientDataSet;
var
i: Integer;
F: TField;
begin
CD.EmptyDataSet;
T.First;
while not T.Eof do begin
CD.Append;
for i:= 0 to T.Fields.Count-1 do begin
F := T.Fields[i];
CD.FieldByName( F.FieldName ).Assign( F );
end;
CD.Post;
T.Next;
end;
end;

The questions:
(1) how could I limit the number of records, which would be assigned to the ClientDataSet? (For the reports.)
(2) how can I carry out if there aren't 10 common records for the last table, (so there will be empty records on the report) the report form begin a new page anyway?


Or... If there is a solution without QuickReport, or anyone know a simpler one, please don't keep it as a secret:)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories