Page Copy
Good afternoon,
Well, I was trying do a report that shows in the same page, Two of Group Header, MasterData and GroupFooter.
But I just can't do it! Just wanna make a copy of those on the same page, like this

Anyone knows any solution?
Ps.: Of course...MasterData1 and 2 must have the same data, as the GroupHeader and GroupFooter.
Thanks ppl
Well, I was trying do a report that shows in the same page, Two of Group Header, MasterData and GroupFooter.
But I just can't do it! Just wanna make a copy of those on the same page, like this

Anyone knows any solution?
Ps.: Of course...MasterData1 and 2 must have the same data, as the GroupHeader and GroupFooter.
Thanks ppl
" border="0" alt="wink.gif" />)
Comments
the output of a grpheader masterdata grpfooter
results in repetition of the masterdataband as many times as there are records that match the group criteria of the header.
you are only showing one.
Does your dataset have more than 1 record?
Yes...The dataset will contain at least 15 records, and I will split tha page if Record Count be higher then 15...But at the moment, in the MasterData, its working fine...Repeating the products that I want...My problem is repeat the upper half, to bottom half
Something like:
Client A - 20 products
Client B - 15 products
Page 1
Client A
15 products
Page 2
Client A
5 products
Page 3
Client B
15 Products
I wanna make it on half page, and a copy of these on the another half.
Was trying with GroupHeader, MasterData and GroupFooter...But if there's another way to do it, please help me to do
Thanksa lot.
@Anu de Deus, I'll try do it, thanks for your help, soon I'll report here the result
Well, I tryied it...But the second page, begins at the end of all others...
Was to be something like that:
|Client A |
|15 |
|_______|
|Client A |
|15 |
|_______|
|Client A |
|5 |
|_______|
|Client A |
|5 |
|_______|
|Client B |
|15 |
|_______|
|Client B |
|15 |
|_______|
But the result was something like that
|Client A |
|15 |
|_______|
|Client A |
| |
|_______|
|Client A |
|5 |
|_______|
| |
| |
|_______|
|Client B |
|15 |
|_______|
|Client A |
|15 |
|_______|
|Client A |
|5 |
|_______|
|Client B |
|15 |
|_______|
>_<
The property StartNewPage was False in all the pages...How can I do to print them in the sequence? Thanks a lot
Forget your approach of 2 pages/2 sets of objects, you only need one, but all you need is to foce a new page when the records reach 15 items, right?
In the report script:
var recordsprinted : integer;
MasterData1OnBeforePrint(sender);
begin
inc(recordsprinted);
if recordsprinted = 15 then
Engine.NewPage;
end;
GroupHeader1OnBeforePrint(sender);
begin
recordsprinted := 0;
end;
Remove your duplicate objects/2nd page and test this, should start making sense now.
You probably need to set GroupHeader.ReprintOnNewPage := true,
The Main problem, is to do a copy on the same page.
- Duplicate the data in your dataset. Make sure the data repeats all the records for each customer, in the right order, so you have Cust A items(#1), Cust A items(#2), Cust B items(#1), Cust B items(#2). In short: prepare the dataset exactly in the way you want to be displayed in the page. However, change the key field (customer ID, or whatever you are grouping by in the GroupHeaders) in the second copy of their data, so your dataset actually has something like
CustA (15 recs)
CustA_1 (15 recs)
CustB (5 recs)
CustB_2 (5 recs)
I think in this way, you don't need the second group of objects, just the 1st one.
You will probably want to make it break the page every 2 group headers printed, to keep your original idea of printing 2 sets every page.
Quick hint for the sql, you will have to adapt/complete it:
select * from (
select CustId as CustId, field1, field2 from table
union
select (CustId +"_1" as CustId), field1, field2 from table
)
order by CustId
At time, I'll use your solotion at now, but still looking for something diferent to use.
But really thanks man XD