Bug Report
Delphi 6
RB 10
Advantage DB
If I link a report data component to my advantage table and set a filter on
the table, you totally loose track of record count property on the table.
ie: I have a table with 100 records but only 4 are linked to my current
master.
I add a detail report to loop through those 4 records via a table link and
everything works perfectly.
I then set a filter that should limit the records down to 2 records that fit
my filter. Now you print the first of the 4 records linked 100 times on the
report. I never seems to move to the next record although it may after it
prints the first 100 and then moves to the second record and prints it 100
times. The problem is my db is much larger than 100 records so the pages
are endless...
Will let you know if I figure out anything else...
Thanks,
glenn
RB 10
Advantage DB
If I link a report data component to my advantage table and set a filter on
the table, you totally loose track of record count property on the table.
ie: I have a table with 100 records but only 4 are linked to my current
master.
I add a detail report to loop through those 4 records via a table link and
everything works perfectly.
I then set a filter that should limit the records down to 2 records that fit
my filter. Now you print the first of the 4 records linked 100 times on the
report. I never seems to move to the next record although it may after it
prints the first 100 and then moves to the second record and prints it 100
times. The problem is my db is much larger than 100 records so the pages
are endless...
Will let you know if I figure out anything else...
Thanks,
glenn
This discussion has been closed.
Comments
I recommend using the AdsQuery to select only the records that need to be
included in the report.
(Fitlers on dataset are slow.)
------------------------------------------------------
Tech Tip: Linking SQL Queries for Master/Detail Data
------------------------------------------------------
The following example shows two options for linking SQL queries to create a
master/detail relationship.
In this example, we are using Delphi's DBDemos data to create a
Customer/Order relationship. Thus we wish to link the Orders detail to the
Customer master.
I. Delphi Query Linking
------------------------
a. Set the detail TQuery.DataSource property to point to the master
query's TDataSource component.
b. In the SQL "Where" clause for the detail query use a ':' followed by
the linking field name from the master:
example
select *
from orders
where orders.CustNo = :CustNo
Now each time the master record position changes, the detail query will
automatically be refreshed with the correct result set.
II. RB DataPipeline Linking
-----------------------------
a. Set the detail DataPipeline.MasterDataPipeline to point to the master
DataPipeline.
b. Use the detail DataPipeline.MasterFieldLinks property to define the
linking relationship
c. In the SQL for the detail, retrieve all records and sort them by the
linking master field:
select *
from Orders
order by CustNo
Notes:
1. Using RB DataPipeline, each query is executed only a single time - thus
performance is much faster.
2. RB Professional and Enterprise Editions include a visual Data environment
for creating SQL queries, defining linking relationships, and creating
Ask-At-Runtime parameters. Using the RB tools you could create the above
linked queries in about 10 seconds.
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com