Reputation:
Good day,I am new to SAP Crystal Reporting. I have a problem dealing with generating reports using SAP Crystal Reports for weeks seems cannot find the answer. The scenario is this one;
I have 2 tables:
dbo.Requestor has these data:
+-----------+---------------+-----------------+
| Ctrl_No | Request_No | Description |
+-----------+---------------+-----------------+
| 001 | 1 | Description 1 |
+-----------+---------------+-----------------+
| 001 | 2 | Description 2 |
+-----------+---------------+-----------------+
| 002 | 1 | Description 1 |
+-----------+---------------+-----------------+
| 002 | 2 | Description 2 |
+-----------+---------------+-----------------+
dbo.Designation has these data:
+-----------+---------------+-----------------+
| Ctrl_No | Request_No | Tasks |
+-----------+---------------+-----------------+
| 001 | 1 | Task 1 |
+-----------+---------------+-----------------+
| 001 | 2 | Task 1 |
+-----------+---------------+-----------------+
| 001 | 2 | Task 2 |
+-----------+---------------+-----------------+
| 002 | 1 | Task 1 |
+-----------+---------------+-----------------+
| 002 | 1 | Task 2 |
+-----------+---------------+-----------------+
as shown above, dbo.Requestor has Ctrl_No 001 and 002 and each Ctrl_No has 2 request_No with its corresponding description. In the dbo.Designation each request, there is tasks assigned, in my example dbo.Designation shows that Request_No 1 with a Ctrl_No of 001 has been assigned of 1 task and Request_No 2 with Ctrl_No of 001 has 2 task assign and so on.
My question is, How can I populate my report in a distinct result? so it could be displayed like this (just ignore some text output):
I highlighted the text to indicate the data are related. I hope I made my question clear. Thanks.
Upvotes: 0
Views: 216
Reputation: 426
To create a sub report:
Insert - Insert Subreport
Create a subreport with Report Wizard : give it name and click on the button next to it
Choose the tables like Millet suggested and finish.
Upvotes: 0
Reputation: 4001
Make the Request info a subreport that uses data just from the Request table. This would avoid record duplication because there is no join to the Task table.
Upvotes: 0