korytnackaruzova
Technical User
Good afternoon,
I kinda got stuck writing a report In Crystal report 2008. I have a database with several time stamps for several kategories (names). I'm only looking for Address and Problem Category (which I'm filtering). I'm trying to get a time stamp for the first problem and the time stamp for the last address before the first problem. For example.
Address 00:36:00
Address 00:38:00
Problem 00:40:00
Problem 00:42:00
Address 00:44:00
My results should show/contain time stamps 00:38:00 for the address and 00:40:00 for the problem.
My logic was to create a column {@MIN_Problem} and use Min formula for the problem- "if {Response_Edit.Field_Name} like "Problem" then Minimum ({Response_Edit.Date_Time})". And the formula works, but it's giving me only value for the Problem name. Address name is blank. I believe that is breaking my other logic I wanted to use.
Then I wanted to write a statement {@LessThanMINProblem}:
"if (({Response_Edit.Field_Name} like "Address") and ({Response_Edit.Date_Time}) < {@MIN_Problem}) then "YES"
else "NO""
This would give me "YES"/"NO" value for the Address, which I would plug into the Max formula:
"if {Response_Edit.Field_Name} like "Address" and {@LessThanMINProblem} like "Yes" then Maximum ({Response_Edit.Date_Time}, ({Response_Edit.Field_Name}))"
The results using these formula are correct for the Problem nature, but the address I'm getting 00:44:00, which is not correct. It should be 00:38:00
I hope this makes a sense. Any help in this case would be very, very appreciated.
Thank you!
I kinda got stuck writing a report In Crystal report 2008. I have a database with several time stamps for several kategories (names). I'm only looking for Address and Problem Category (which I'm filtering). I'm trying to get a time stamp for the first problem and the time stamp for the last address before the first problem. For example.
Address 00:36:00
Address 00:38:00
Problem 00:40:00
Problem 00:42:00
Address 00:44:00
My results should show/contain time stamps 00:38:00 for the address and 00:40:00 for the problem.
My logic was to create a column {@MIN_Problem} and use Min formula for the problem- "if {Response_Edit.Field_Name} like "Problem" then Minimum ({Response_Edit.Date_Time})". And the formula works, but it's giving me only value for the Problem name. Address name is blank. I believe that is breaking my other logic I wanted to use.
Then I wanted to write a statement {@LessThanMINProblem}:
"if (({Response_Edit.Field_Name} like "Address") and ({Response_Edit.Date_Time}) < {@MIN_Problem}) then "YES"
else "NO""
This would give me "YES"/"NO" value for the Address, which I would plug into the Max formula:
"if {Response_Edit.Field_Name} like "Address" and {@LessThanMINProblem} like "Yes" then Maximum ({Response_Edit.Date_Time}, ({Response_Edit.Field_Name}))"
The results using these formula are correct for the Problem nature, but the address I'm getting 00:44:00, which is not correct. It should be 00:38:00
I hope this makes a sense. Any help in this case would be very, very appreciated.
Thank you!