Home > Back-end >  How to make some masterData in Fastreport like pageheader each page shows?
How to make some masterData in Fastreport like pageheader each page shows?

Time:10-06


Need to print the style as shown (but specific content to change), the red part is to print each page, the page content are the same, until the following "honoured" finished printing
Explain, to gain honor and position change is no master-slave relationship, so now use two masterdata respectively, but need each page shows "change jobs", I don't know should how to deal with this? How to make corresponding masterData "post change" like pageheader are shown as the content of each page? I don't know my way around fastreport

CodePudding user response:

You pull the field directly on the page, in the first column of condition that can be print out a master record at a time, it will not move down the record pointer,

CodePudding user response:

reference 1st floor babydog01 response:
you directly pull the field in the header bar is ok, on condition that can be print out a master record at a time, it will not move down the record pointer,

Only print a master record? But I want more than just a record, and each page has, and is the same

CodePudding user response:

refer to the second floor liangyx46 response:
Quote: refer to 1st floor babydog01 response:

You pull the field directly on the page, in the first column of condition that can be print out a master record at a time, it will not move down the record pointer,

Only print a master record? But I want more than just a record, and each page, and is the same

Still not understand what you mean? Since all the pages are the same, that this method is feasible,

CodePudding user response:

Use this method need not master-slave table,
We refer to table 1 and table 2, the corresponding multiple records in the table 2, table 1
If you want to print the table 1 multiple records in Delphi alter the content of table 1, table 2 with loops can be the direct print,

While not adoquery1. Eof do begin
Adoquery2. Close;
Adoquery2. SQL. The clear;
Adouqery2. SQL. Add (' select * from table 2 where... ')
Self. FrxReport1. LoadFromFile (' schedule of reports/statistics. Fr3);
//here also can need not the header data related to table 1, use this directly change the value of the header
//TfrxMemoView (frxReport1 FindObject (' Memo13 ')). The Memo. Text:=adoquery1. Fieldbyname (' name '). Asstring;
Self. FrxReport1. ShowReport;
Adoquery1. Next;
Try myself understand,
end;
Write code, about the meaning,

CodePudding user response:

reference babydog01 reply: 3/f
Quote: refer to the second floor liangyx46 response:

Quote: refer to 1st floor babydog01 response:

You pull the field directly on the page, in the first column of condition that can be print out a master record at a time, it will not move down the record pointer,

Only print a master record? But I want more than just a record, and each page, and is the same

Still not understand what you mean? Since all the pages are the same, that this method is feasible,


"Employee name", "in time" with TfrxMemoView (frxReport1. FindObject (' Memo13 ')). The Memo. Text:=adoquery1. Fieldbyname (' name '). Asstring; This method is no problem,
But each employee "post change" was recorded several article, I just want to ask how the "post change" as a few records of each page to print?

CodePudding user response:

You can put the following two two master data,
FR with support for multiple data, the system to print complete each print the second again,

CodePudding user response:

refer to 6th floor babydog01 response:
you can put the following two two master data,
FR with support for multiple data, the system print complete each to print the second,


I just want to ask how to make the first data with each page to print the same results ~
For the first data usually only one or two records, while the second data with more, so after the first data to take on the first page to print the second page will not appear ~
Tried before Page1OnBeforePrint events added a MasterData1 DataSet. First, but no effect ~ what method lets MasterData1 each page to print?

CodePudding user response:

Procedure Header2OnBeforePrint (Sender: TfrxComponent);
The begin
IF & lt; Page# & gt; <> 1 then
The begin
Engine. ShowBand (Header1);
MasterData1. DataSet. First;

While not MasterData1. DataSet. Eof do
The begin
Engine. ShowBand (MasterData1);
MasterData1. DataSet. Next;
end;
end;
end;

Using the above method, but MasterData1 only print the first line, at the back of the blank? Why is that?
  • Related