I use an ODBC for SAPDB connection. For simple reports it works fine in crystal reports 10, but when I make group by differents hierarchies and refresh the report data, crystal send this error:
Failed to open rowset.
Details: 42000:[SAP AG][SQLOD32.DLL][SAP DB] Syntas error or access violation;-5015 POS(96) Missing keywordELECT

It appears because the SQL Query that crystal reports generates is wrong:

SELECT "WAREHOUSES"."WAREHOUSEID", "WAREHOUSES"."DESCRIPTION", "CLASSES"."CLASSID"
FROM ((("DBA"."INVENTORY_MOVEMENT_DOCUMENTS" "INVENTORY_MOVEMENT_DOCUMENTS" INNER JOIN "DBA"."WAREHOUSES" "WAREHOUSES" ON "INVENTORY_MOVEMENT_DOCUMENTS"."WAREHOUSEID"="WARE HOUSES"."WAREHOUSEID") INNER JOIN "DBA"."INVENTORY_MOVEMENT_DETAILS" "INVENTORY_MOVEMENT_DETAILS" ON "INVENTORY_MOVEMENT_DOCUMENTS"."INVENT_MOVEMENT_DO CUMENTID"="INVENTORY_MOVEMENT_DETAILS"."INVENT_MOV EMENT_DOCUMENTID") INNER JOIN "DBA"."PRODUCTS" "PRODUCTS" ON "INVENTORY_MOVEMENT_DETAILS"."PRODUCTID"="PRODUCTS "."PRODUCTID") INNER JOIN "DBA"."CLASSES" "CLASSES" ON "PRODUCTS"."CLASSID"="CLASSES"."CLASSID"
ORDER BY "WAREHOUSES"."WAREHOUSEID", "CLASSES"."CLASSID"

This happens by the parenthesis after the key word FROM. I copied and pasted this SQL query in SQL Studio and appeared the same error message that appeared in crystal reports. I suppressed the parenthesis and it run fine in the SQL studio.

In Crystal Reports version 8.5 I can modify the SQL query in DATABASE--> SHOW SQL QUERY --> EDIT, but in version 10 I can't do that.

How can I modify the SQL query or What Can I do with this problem?

THANKS