We have an administration system (Blackbaud) which uses a Sybase SQL Anywhere server for the backend. We also have ODBC access to the database, and complete docs on the table and linking structure. We have Crystal 7.0 to report with.
The problem is this: The database has about 30 "tables" defining values such as countries, states, relationship type, address type, phone type, etc., which are all customizable. However, the various tables which appear separate within the application are actually condensed into two tables called "code tables" and a field is used to determine which "table type" the record belongs to. ie:
So when building a report, I may need to select only those records of relationship type="x,y,z", and for those records, select address records of address type="q,r,s", along with phone type="t,u,v", where each of the select criteria all reside in a single table, with only a "table type" field to distinguish what table the record belongs to.
To put it another way, I need to do this:
Select PARENT where type = x,y,x and table_type=rel_type
select address where type = q,r,s and table_type=addr_type
select phone where type = t,u,v and table_type=ph_type
etc.
I have been able to accomplish *some* of the above by using a different subreport for each table_type, but the number of subreports is getting out of hand, and I still cannot get all the data I need. Also, the report is now taking an excessively long time to run due to the subreports. (~10 minutes for 45 pages).
Any ideas of pointers to SQL resources would be appreciated.
Thanks
The problem is this: The database has about 30 "tables" defining values such as countries, states, relationship type, address type, phone type, etc., which are all customizable. However, the various tables which appear separate within the application are actually condensed into two tables called "code tables" and a field is used to determine which "table type" the record belongs to. ie:
So when building a report, I may need to select only those records of relationship type="x,y,z", and for those records, select address records of address type="q,r,s", along with phone type="t,u,v", where each of the select criteria all reside in a single table, with only a "table type" field to distinguish what table the record belongs to.
To put it another way, I need to do this:
Select PARENT where type = x,y,x and table_type=rel_type
select address where type = q,r,s and table_type=addr_type
select phone where type = t,u,v and table_type=ph_type
etc.
I have been able to accomplish *some* of the above by using a different subreport for each table_type, but the number of subreports is getting out of hand, and I still cannot get all the data I need. Also, the report is now taking an excessively long time to run due to the subreports. (~10 minutes for 45 pages).
Any ideas of pointers to SQL resources would be appreciated.
Thanks