Skip to Content
0

A string is required here.

Sep 04, 2017 at 12:15 PM

73

avatar image
Former Member

I've built two different reports for my companies website they both function in .NETs Preview but when I post I get errors when trying to run the queries.

A string is required here.
Details: errorKind Error in File shiftScoreCard 6672_11040_{039320F3-04E5-460B-9FA7-B35C3C005752}.rpt:
Error in formula Record_Selection:
'(not HasValue({?@shiftdate}) OR {shiftScoreCard.shiftDate} = {?@shiftdate}) and '
A string is required here.

Details: errorKind

&

A string is required here.
Details: errorKind Error in File oee 2672_4532_{BF5449DD-5C30-4154-94E6-6AACD2136791}.rpt:
Error in formula Record_Selection:
'(not HasValue({?@team}) OR {woRelease.buildTeam} = {?@team}) and '
A string is required here.
Details: errorKind

This is perplexing.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Ian Waterman Sep 05, 2017 at 08:51 AM
1

Check your data types are same, I assume you have created {?@shiftdate} as a date. Are you sure {shiftScoreCard.shiftDate} is a date field and not a string

{shiftScoreCard.shiftDate} = {?@shiftdate}

Make sure data types are same for

{woRelease.buildTeam} = {?@team})

Ian

Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Sep 06, 2017 at 03:42 PM
1

Hi Jesse,

It likely is due to the DB client being used, CR dynamically builds the SQL when connecting so make sure they are both using the same Client. And depending on the Client capabilities it could alter the SQL.

Don

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Sep 06, 2017 at 03:32 PM
0

yeah. shiftDate is date and buildTeam is string.

Does the record selector need to have all types the 'same' in order to function correctly? I ran into a problem like this doing dynamic groups in the formula fields... I'd have to cast to string or date depending on which parameter was used the most. It's difficult to troubleshoot because the error only occurs on live. In preview, the way it is coded works. Could it be a driver inconsistency between local and live?

Here's one of the record selects:

(not HasValue({?@shift}) OR {shiftScoreCard.shift} = {?@shift}) and (not HasValue({?@shiftdate}) OR {shiftScoreCard.shiftDate} = {?@shiftdate})

shiftdate is date and shift is string.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Sep 13, 2017 at 09:01 PM
0

the problem on both reports was with shiftDate. I was running an updated version of Crystal Reports the live app is behind a bit. I guess the old version doesn't handle Date only fields from SQL... it was converting it to a string and then vomiting. Thanks for the help.

Share
10 |10000 characters needed characters left characters exceeded