Help - Search - Members - Calendar
Full Version: Page Copy
Fast Reports forum > Fast Reports Products > FastReport 4.0
Alceon
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 wink.gif
Anu de Deus
I don't know how to do exactly that in the designer, but to have the desired effect at runtime, create a 2nd page, drop your repeated components there (i.e, remove from the 1st page as you showed in the example), and set this 2nd page property PrintOnPreviousPage = true, make sure that none of the bands have StartNewPage =true.
gordk
what you are trying to lay out does not make sense using a group header footer
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?
Alceon
QUOTE(gordk @ Mar 12 2010, 05:36 AM) *
what you are trying to lay out does not make sense using a group header footer
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 =)

Anu de Deus
Now its' cleart to me.
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,
Alceon
Thanks, on this way, the page get splitted when record count are higher then 15, but I cant do a Copy on the same page =/
The Main problem, is to do a copy on the same page.
Anu de Deus
What you want to do is difficult to achieve, but possible. The key is to fix your data before trying to reporting it. I'll try to explain here shortly:

- 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



Alceon
Uow...Thanks a lot man...It really worked...But I do have a lot of records, and take a time to pass trough all, but it works...=)
At time, I'll use your solotion at now, but still looking for something diferent to use.
But really thanks man XD
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.