I am working with Crystal Reports 2011 and querying Views in a Pervasive v2011 data engine. I am trying to execute a pretty long select in Crystal Reports on a Pervasive database.
Everything works fine until my last WHERE in my SELECT. I have a parameter and I am trying to find the snippet that is in the parameter in description fields. I try to add wild cards to a LIKE statement on a Description field by correcting the forumla in Select expert.
From there it appears that Crystal is messing things up in a huge way. In the long query when I view the SQL query, it appears it is not coding it correctly at all (Database > Show SQL Query). When I strip the query down as basic as I can, it codes the like correctly but returns nothing. If I copy the code on the big query from Show SQL Query, fix the like statement then paste and execute it into PCC, it returns the results I expect.
Query Portion from Pervasive Generated SQL ("V_PO_LINES"."DESCRIPTION" LIKE '%' OR "V_PO_LINES"."DESCRIPTION" LIKE '%' OR "V_PO_LINES"."DESCRIPTION" LIKE '{?LikeText}')
Query wrote by Crystal in Stripped down and simplified query. SELECT "PO_LINES"."DESCRIPTION" WHERE "PO_LINES"."DESCRIPTION" LIKE '%{?LikeText}%'
SQL snip from long query that works in PCC. ("V_PO_LINES"."DESCRIPTION" LIKE '%{?LikeText}%')
Select Statement Crystal Select Expert. {V_PO_LINES.DATE_LAST_RECEIVED} <> Date (not closed) and {V_PO_LINES.DATE_DUE_LINE} = {?Date Range} and {V_PO_LINES.VENDOR} = {?Vendor} and {V_PO_LINES.DESCRIPTION} like '%' + {?LikeText} + '%'
I am on 2011 Version 14.04.738 RTM
Is anyone else running into this? Is there a fix or workaround?