Symptom
"Failed to retrieve data from database" error while refreshing Crystal Report based off DB2 Mainframe Command Object.
Environment
Reproducing the Issue
SET CURRENT SCHEMA = '{?parameter}'; 4. Drag and drop some fields in the Details section. 5. Refresh the report.
Select * from table
Cause
- For example if we run:
select * from table1;
select * from table2
Crystal returns only first statement. - When we use the native drivers of IBM DB2 we are able to run the statement
set current schema='{?parameter}';
select * from table
Resolution
To work around this issue use the statement like:
select * from '{?parameter}'.table
Keywords
Crystal Reports , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem