order within a subreport
Hi,
I have two tables (TTables), one tabmaster.dbf, the other
tabslave.dbf.
Tabmaster.dbf has six fields, one of which is the 'main'
order field (TABref).
Tabslave.dbf has seven fields, one of which is the order
field (tabind) and another field is TABREF which allows
me to link between the tabmaster and tabslave tables.
Both TABIND and TABREF are indexed in TABSLAVE.DBF.
I've created a report which shows tabmaster's data along
with each of tabmaster's item detail as specified in
tabslave.dbf. The order of tabmaster is correct,
but when displayed, the order of the values within
the subreport of tabslave is not in TABIND order
but in according to its actual order in the table.
How do I get the subreport to also display the order
of the subreport in accordance to the TABIND
field?
Any help appreciated.
Edmund
I have two tables (TTables), one tabmaster.dbf, the other
tabslave.dbf.
Tabmaster.dbf has six fields, one of which is the 'main'
order field (TABref).
Tabslave.dbf has seven fields, one of which is the order
field (tabind) and another field is TABREF which allows
me to link between the tabmaster and tabslave tables.
Both TABIND and TABREF are indexed in TABSLAVE.DBF.
I've created a report which shows tabmaster's data along
with each of tabmaster's item detail as specified in
tabslave.dbf. The order of tabmaster is correct,
but when displayed, the order of the values within
the subreport of tabslave is not in TABIND order
but in according to its actual order in the table.
How do I get the subreport to also display the order
of the subreport in accordance to the TABIND
field?
Any help appreciated.
Edmund
This discussion has been closed.
Comments
ReportBuilder retrieves data as-is from the dataset it is connected to. If
you would like to change the order in which data is displayed in a report,
you will need to create a SQL query that defines what order you would like.
Note that for a Master-Detail report like the one you are creating, you will
need to first order by the linking field, then you are free to order by
other fields.
Example...
SELECT *
FROM tabslave.dbf
ORDER BY TABREF, TABIND
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com