BTW This is not an error
there is a number of ways to accomplish this and it is up to the programmer to decide what to do and where to write code.
Assuming your page allows 24 records
don't connect your master databand to the frxdbdataset. but set its rowcount property to the dataset's record count
add an empty memo object sized the same as the picture object behind the picture objectset visible to false;
on the code page declare variable
var ds:tfrxdataset;
in the empty begin end. block add code
Begin
ds := Report.GetDataset('frxDBDataSet1');
ds.first; // set on first record
memo1.visible :=false;
picture1.visible := false;
masterdata1.rowcount :=24;// set rowcount
// you can retreive the record count of ds and do the math if you have a larger database.
End.
now write code for the obp event of the master band.
if (<line#> > 1) and not ds.eof then
begin
ds.next
else
memo1.visible := true;
picture1.visible := false;
end;
thanks grodk.
But this code is not working:([img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
masterdata obp event is not working with this code.
I think I must explain more than good.
So I am sending my report's design pic:[/img]
slight change we should write the code to hide the picture in the oap event of the master band.
var
ds: tfrxdataset;
procedure Band3OnAfterPrint(Sender: TfrxComponent);
begin
if <line#> = ds.recordcount then
begin
picture1.visible := false;
memo1.visible := true;
end
else
begin
ds.next;
end;
Thanks gordk.
I think I am stupid [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
I can't runnig again[/img][img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
I am sending example.
Pls can you change in example and send again me.
Thanks...[/img]
thanks grodk.
But this code is not working:([img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
masterdata obp event is not working with this code.
I think I must explain more than good.
So I am sending my report's design pic:[/img]
But i said this (2.) my reply...
I has said: 1.Groupheader1 (Condition property: frxDBDataset1."CustomerCity", Startnewpage property:true,because I am wanting to group for customer city)
Very very thanks gordk.
Sorry I didn't open internet 5-6 days.
Thanks for helps.
But your rar file is broken.
I am downloading samplereport.rar file.
but i can't open because give an error.
pls check.
again very very thanksss.
Very very thanks Gordk.
your mail did come and I did download.
Works fine.
Very very thanks again...[img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
See you..[/img]
Comments
there is a number of ways to accomplish this and it is up to the programmer to decide what to do and where to write code.
Assuming your page allows 24 records
don't connect your master databand to the frxdbdataset. but set its rowcount property to the dataset's record count
add an empty memo object sized the same as the picture object behind the picture objectset visible to false;
on the code page declare variable
var ds:tfrxdataset;
in the empty begin end. block add code
Begin
ds := Report.GetDataset('frxDBDataSet1');
ds.first; // set on first record
memo1.visible :=false;
picture1.visible := false;
masterdata1.rowcount :=24;// set rowcount
// you can retreive the record count of ds and do the math if you have a larger database.
End.
now write code for the obp event of the master band.
if (<line#> > 1) and not ds.eof then
begin
ds.next
else
memo1.visible := true;
picture1.visible := false;
end;
But this code is not working:([img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> masterdata obp event is not working with this code. I think I must explain more than good. So I am sending my report's design pic:[/img]
var
ds: tfrxdataset;
procedure Band3OnAfterPrint(Sender: TfrxComponent);
begin
if <line#> = ds.recordcount then
begin
picture1.visible := false;
memo1.visible := true;
end
else
begin
ds.next;
end;
end;
begin
ds:= Report.GetDataset('Bio');
ds.first;
end.
I think I am stupid [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> I can't runnig again[/img][img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> I am sending example. Pls can you change in example and send again me. Thanks...[/img]
But i said this (2.) my reply...
I has said: 1.Groupheader1 (Condition property: frxDBDataset1."CustomerCity", Startnewpage property:true,because I am wanting to group for customer city)
Can you help to me pls with example?
Sorry I didn't open internet 5-6 days.
Thanks for helps.
But your rar file is broken.
I am downloading samplereport.rar file.
but i can't open because give an error.
pls check.
again very very thanksss.
if you want send without rar
your mail did come and I did download.
Works fine.
Very very thanks again...[img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> See you..[/img]