Quantcast
Viewing all articles
Browse latest Browse all 1507

Need to display data in crystal reports

Hi friends,

I have a different scenario. Here it goes..

Maximum 3 doctors can verify a test. In an order there could be 'N' number of tests and each test can be verified by max 3 doctors. 

Suppose in an order there are 10 tests.

Test 1 and Test 2 has been verified by 3 doctors and all are same.

Test 3 is also verified by 3 doctors but different doctors.

Test 4 and Test 5 has been verified by 2 doctors and all are same

Test 6 has been verified by 2 doctors but different doctors

Test 7 and Test 8 has been verified by 1 doctor and is same doctor.

Test 9 is verified by 1 doctor each but different doctors.

Below is the tabular format for the same... My datatable has the similar structure. I am just considering 2 columns here.

ItemIDDocID
1doc 1
1doc 2
1doc 3
2doc 1
2doc 2
2doc 3
3doc 2
3doc 3
3doc 4
4doc 4
4doc 5
5doc 4
5doc 5
6doc 5
6doc 6
7doc 6
8doc 6
9doc 7
10doc 8

I need to take print out using crystal reports based on below condition.

1. All the tests having 3 same doctors should be grouped and at the end of the group, need to display the 3 doctors (Test 1 and Test 2 should be displayed first)

2. All the tests having 3 doctors but different doctors should come next and at the end of the group, need to display the doctors (Test 3 should be displayed in second place)

3. All the tests having 2 same doctors should be grouped and at the end of the group, need to display the 2 doctors (Test 4 and Test 5 should display in 3rd place)

It continues till all the tests are printed.

Please help me with the logic.

Many thanks in advance

-- Haritha


Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>