Hi All,
I have been asked to have a look at the performance of a crystal report but I am a complete newbie without any training ! Can anyone hep with the following problem.
We have a report that extracts data from an MS SQL database. I have traced the problem to the data selection on a sub report.
Basically, the subreport receives the customer number from the main report and selects from the customer master table the 1 record matching this customers. The customer record returns a lot of fields, including 6 fields that contain specific codes.
The report has to display the text for the codes in the selected language not the actual code.
However, the orginal designer has selected these text via a left outer join and then uses a formula in the record selection.
I see;
in the record selection. For each of the @ fields, I can see;
if IsNull ({ZTPPURINFLT_SMO.SPRAS}) then '1' else
if {ZTPPURINFLT_SMO.SPRAS} = {?Pm-?Language} then '1' else '2'
I understand how this works. It returns all the records from the SQL data base using the left outer join but internally in Crystal it only selects where the code is null or in the parameter language.
Because we have a lot of langauges on the DB, this cause a mssive select. If the customer has an entry in each on the six field, the select trace shows
Field 1 2 3 4 5 6
EN EN EN EN EN AT
EN EN EN EN EN DE
..
..
EN EN EN EN AT EN
And so on. This matrix returns circa 192,000 records and that is the route of our problem.
What I would like to do is read the 1 customer record using the partner number key field. and fire of up to 6 separate reads of the text tables if there is an entry in the code field on the customer master record.
My problem is, I have no idea how to do this in CR !!
Sorry for such a long question, but I have tried to detail the issue as much as possible.
Thanks in advance.
James