on 03-08-2019 6:46 AM
Hello experts,
I created a report which is displaying 2 records for every student. The student ID, Name, DOB all these fields are repeated and same, the only difference is there are other fields that are not similar, 'Submit Date', 'Approved by'. I would like to merge this data into one record. Is this possible in Crystal report? Thanks in advance.
Current results:
StudentID Name 'Submit Date' 'Approved by'
1234 SAM '01-1-2019' Hary
1234 SAM '02-1-2019' John
Expected results:
StudentID Name 'Submit Date' 'Approved by' 'Submit Date 2' 'Approved by 2'
1234 SAM '01-1-2019' Hary '02-1-2019' John
Please attach screenshots of the Design and the Preview page.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
Thanks for your help! After applying Sort on the Submit Date field in Ascending Order it fixed some issue but I still see repeating names for some of the records. Is there anything that i am missing? or is there another way to achieve this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anjan,
Could you try this please:
1. Add a Sort on the Submit Date field in Ascending Order
2. Make sure that the field under the Submit Date column is the database field and not the Submit Date 2 formula field. I hope you've placed fields on the Group Header
3. Make sure that the field under the Approved by is also the actual database field and not the Approvedby2 formula.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
Let me know if you need any more info. Any thoughts why am i getting this result?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
I changed the SubimtDate2 formula and i don't see the error message anymore.The issue is i am seeing repeating value for some of the records not sure why. For eg.
Expected results:
StudentID, Name, Submit Date, Approved by, Submit Date 2, Approved by
21234, SAM, 11/1/2019 10:01:05 AM, HARY, 02/1/2019 03:12:02 PM, JOHN
But I am getting this:
1234, SAM, 02/1/2019 03:12:02 PM, JOHN, 02/1/2019 03:12:02 PM, JOHN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anjan,
Change the SubmitDate2 formula to:
If Minimum({SubmitDate},{StudentID}) = Maximum({SubmitDate},{StudentID}) Then
CDate(0,0,0) Else
Maximum({SubmitDate},{StudentID})
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please advise?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Abhilash. I was getting an error 'A String is required' for @SubmitDate2 so i casted it totext. I am not getting proper results. Some of the Approver names are repeating for both the approvers. Not sure what is wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anjan,
Please try these steps:
1.Insert a group on the StudentID field
2. Move the StudentID, Name, Submit Date and Approved by fields to the Group Header
3. Create a formula called @SubmitDate2 with this code and place on the Group Header under the label "Submit Date 2"
If Minimum({SubmitDate}, {StudentID}) = Maximum({SubmitDate}, {StudentID}) Then ""
Else Maximum({SubmitDate}, {StudentID})
4. Create a formula called @ApprovedBy2 with this code and place on the Group Header under the label "Approved By 2"
If Minimum({ApprovedBy}, {StudentID}) = Maximum({ApprovedBy}, {StudentID}) Then ""
Else Maximum({ApprovedBy}, {StudentID})
5. Suppress the Details and the Group Footer sections
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anjan,
Is this consistent for all Students?
Does each Student have two rows or could someone have more?
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.