Hi all,
First, thanks much to all for your help!
I'm using Crystal Reports 2013.
I have a fairly complex report coming off of a SQLServer database. The report involves many tables.
The records in this main report have a one-to-many relationship with one of the tables that shows actions taken on the main record. Each action has a number of DateTime fields that record specific steps on that action. I need to determine the earliest DateTime in one field among all the records present and the latest DateTime in another field (again for all the records).
I then want to transfer them to the main report and finally calculate the amount of time that elapsed between these two DateTime records that have been determined to fit what I need.
I have a Subreport that takes the action records, uses the appropriate DateTime field, calculates the Minimum value and then has a formula that creates a shared variable for the record needed. This all works fine.
I then have a formula on the main report that picks up this shared variable and uses it in the main report.
I plan to use the same process to get the other DateTime field, once I get the first one working correctly.
Everything works, except for the DateTime that is brought back to the main report appears in the detail line AFTER the correct detail line for the relevant record. The value is calculated correctly and is transferred to the main report correctly but then appears in the wrong record, always one record after where it should be.
Can anyone tell me why this is happening and how to correct the problem?
Thanks so much for your help!
Brad
First, thanks much to all for your help!
I'm using Crystal Reports 2013.
I have a fairly complex report coming off of a SQLServer database. The report involves many tables.
The records in this main report have a one-to-many relationship with one of the tables that shows actions taken on the main record. Each action has a number of DateTime fields that record specific steps on that action. I need to determine the earliest DateTime in one field among all the records present and the latest DateTime in another field (again for all the records).
I then want to transfer them to the main report and finally calculate the amount of time that elapsed between these two DateTime records that have been determined to fit what I need.
I have a Subreport that takes the action records, uses the appropriate DateTime field, calculates the Minimum value and then has a formula that creates a shared variable for the record needed. This all works fine.
I then have a formula on the main report that picks up this shared variable and uses it in the main report.
I plan to use the same process to get the other DateTime field, once I get the first one working correctly.
Everything works, except for the DateTime that is brought back to the main report appears in the detail line AFTER the correct detail line for the relevant record. The value is calculated correctly and is transferred to the main report correctly but then appears in the wrong record, always one record after where it should be.
Can anyone tell me why this is happening and how to correct the problem?
Thanks so much for your help!
Brad