Good day,
Hopefully someone can help me out. I am trying to display the value of a field in one table as a caption in the report header. This caption is above a ‘description’ field in the details section. When I run my report, I get the description field displaying 832 times; which is the number of rows found in my caption table. Here is the structure of the two tables:
Table 1: Code, Description
Table 2: Table, Name, Field Name, Caption
Here are the SQL Expressions that I have tried:
(SELECT Caption FROM Table2
WHERE Table2.FieldName='Description'
AND Table2.TableName='Code')
(SELECT DISTINCT Caption FROM Table2
WHERE Table2.FieldName='Description'
AND Table2.TableName='Code')
And
(SELECT TOP 1 Caption FROM Table2
WHERE Table2.FieldName='Description'
AND Table2.TableName='Code')
If I run these directly in my Db, I get correct results. If in Crystal, incorrect results. I have tried the following suppress on the Details: Table1.Code= previous (Table1.Code) which works UNLESS I have any summaries. Once I include a summary, my total ALWAYS factors in the suppressed, duplicate records.
Any ideas?