eg. i selected 1st and 4th and 5th row (DBGrid MultiSelection = True)
on my DBGrid and i want to show these lines on my report instead
the whole dbgrid(or datasource).
Thanx
Create an empty copy of the dataset, batchcopy the selected rows to
the new dataset and then assign the dataset to the report's dataset
property.
regards
A.G.
you have to use filters with your DataSource1.Database (DataSource1 is the
source which the Grid is linked to) or directly with the Table/Query
component.
- Tobias (tobias...@swol.de)
forums.inprise.com <gat...@hotmail.com> wrote in message
news:77dn45$o9...@forums.borland.com...
do you want to try to filter 100.000 records ? =)
it takes about half hour to filter the 100.000 records ...
- Tobias (tobias...@swol.de)
Put the DataSet property of your Report to nothing. This make the report to
ask you for data at the OnNeedData Event.
Place there code to jump on the table using the SelectedRows property of the
grid (A list of bookmarks) and stop the report.
HTH
forums.inprise.com escribió en mensaje <77dn45$o9...@forums.borland.com>...
do you have any idea how to implement the OnNeedData Event
in code ? eg to place the selected Rows of DBGrid to report ?
i need the code if you can post it .. thanx =)
150.000 records in 3 seconds ? can you show me how to do this ?
thanx
(i'm using paradox 7 and i use setrange to do the work. it's too much
faster thanx Filter)
Add this lines to your code ...
...
private
{ Private declarations }
FCont: integer;
...
procedure TForm1.QuickRep1BeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
FCont := 0;
end;
procedure TForm1.QuickRep1NeedData(Sender: TObject; var MoreData: Boolean);
begin
MoreData := (FCont < DBGrid1.SelectedRows.Count);
if MoreData then
begin
Table1.Bookmark := DBGrid1.SelectedRows[FCont];
Inc(FCont);
end;//if
end;
forums.inprise.com escribió en mensaje <77j7a5$sl...@forums.borland.com>...
well it doesn't work .. it's show me an error message
"Record/Key Deleted". =(
i would really apriciate if you can send me a example project .. =)
my e-mail gat...@hotmail.com
if you can't send me that ok.. thanx again for all your answers.
I send you the project...
Babis Michail escribió en mensaje <77lpoh$1h...@forums.borland.com>...