Hello:
I have an old report written by someone else that doesn't work anymore in Crystal 11 and Crystal Reports SDK 2013 for the reasons I will explain next.
To keep things simple I will explain what happens in Crystal 11 and the same issues are in the Crystal Reports SDK 2013. Here are the details:
- The report is old, I cannot open it in 8.5 but I can open it with Crystal 11
- The data behind the report comes from two views that are inner joined. There is also a condition, an exists clause that filters data.
- When I go to Show SQL Query in Crystal 11, it connects to the oracle database, it detects that a view changed, it refreshes the information about the view but then it returns a query that is incorrect (hence the report fails to preview). This is caused by the fact the Crystal 11 switched the syntax for inner joins to the ansi syntax, so the query becomes:
select ...
from table1 inner join table2 on ....
where and exists (select .... )
whereas before it was:
select ..
from table1, table2
where <join>
and exists (select ...)
which is correct syntactically.
So, how can I fix this with a minimal effort (I don't want to write the report from scratch)?
I do not understand how the previous developer added the exists clause to the query built by Crystal. In the database expert there two views and there is no command object. In version 11 the only way to add the exists clause seems to be by adding a command (that would replace the two views) in the Database Expert dialog, but if I do that and I remove the views all my fields in the report become orphaned. Did a previous version of Crystal support adding where clauses outside the context of a command object?
Thanks