Quick background. 90% of the reports I write are fed their data from a VB program with a SQL DB. So I write the queries, use the program for the parameters and pass the results to the report. 10% I actually use Crystal's linking/parameters.
The report uses 2 tables. The first has a listing of assets (UID, model, description, barcode). The second table is a listing of each time the asset was inventoried. I have 2000 rows in the first table (2000 pieces of equipment a group is responsible for) and about 5000 rows in the second table.
Table 1
UID Model Descript. Barcode
1 10001 Mouse M101
2 10001 Mouse M102
3 198820 Keyboard K101
4 199820 Keyboard K120
Table 2
Table1UID RecordUID Date By
1 1 07-09-04 User1
3 2 07-09-04 User1
4 3 07-09-04 User1
1 4 09-01-05 User1
Here's the catch. As Items are inventoried, they are added to table 2. So, in the example above, Barcode M102 wasn't inventoried in 7/9/04 (might have been lost).
My report has a parameter asking the user for the date (from table2) they wish to run the report for. The information in table 2 (date and by) is displayed in a subreport if exists.
If the report was run for 7/9/04 it would show:
Model Descript. Barcode Date By
10001 Mouse M101 07-09-04 User1
10001 Mouse M102
198820 Keyboard K101 07-09-04 User1
199820 Keyboard K120 07-09-04 User1
The problem is that the subreport is going to line 1, quering 5000 records, going to line 2, quering 5000 records, etc, etc.. This causes it to die a horrible death after the 1st page.
Any suggestions?
The report uses 2 tables. The first has a listing of assets (UID, model, description, barcode). The second table is a listing of each time the asset was inventoried. I have 2000 rows in the first table (2000 pieces of equipment a group is responsible for) and about 5000 rows in the second table.
Table 1
UID Model Descript. Barcode
1 10001 Mouse M101
2 10001 Mouse M102
3 198820 Keyboard K101
4 199820 Keyboard K120
Table 2
Table1UID RecordUID Date By
1 1 07-09-04 User1
3 2 07-09-04 User1
4 3 07-09-04 User1
1 4 09-01-05 User1
Here's the catch. As Items are inventoried, they are added to table 2. So, in the example above, Barcode M102 wasn't inventoried in 7/9/04 (might have been lost).
My report has a parameter asking the user for the date (from table2) they wish to run the report for. The information in table 2 (date and by) is displayed in a subreport if exists.
If the report was run for 7/9/04 it would show:
Model Descript. Barcode Date By
10001 Mouse M101 07-09-04 User1
10001 Mouse M102
198820 Keyboard K101 07-09-04 User1
199820 Keyboard K120 07-09-04 User1
The problem is that the subreport is going to line 1, quering 5000 records, going to line 2, quering 5000 records, etc, etc.. This causes it to die a horrible death after the 1st page.
Any suggestions?